From 1c4ad499dc344e2b111db152b275bbe5d7cc9a63 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Fri, 9 May 2025 10:51:03 -0700 Subject: [PATCH] prohibit DefWindowProc from running on syschars, for everything except alt+space --- src/os/gfx/win32/os_gfx_win32.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/os/gfx/win32/os_gfx_win32.c b/src/os/gfx/win32/os_gfx_win32.c index 8d2698c6..7d04f2c2 100644 --- a/src/os/gfx/win32/os_gfx_win32.c +++ b/src/os/gfx/win32/os_gfx_win32.c @@ -489,7 +489,15 @@ os_w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_SYSCHAR: { - result = DefWindowProcW(hwnd, uMsg, wParam, lParam); + WORD vk_code = LOWORD(wParam); + if(vk_code == VK_SPACE) + { + result = DefWindowProcW(hwnd, uMsg, wParam, lParam); + } + else + { + result = 0; + } }break; case WM_CHAR: