From aa0eec576381fb621709b844752defc534e28165 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Fri, 19 Sep 2025 16:58:41 -0700 Subject: [PATCH] prevent focusing null window, which was causing weird input event stealing on run... --- src/os/gfx/win32/os_gfx_win32.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/os/gfx/win32/os_gfx_win32.c b/src/os/gfx/win32/os_gfx_win32.c index 7874d97e..5b8ab880 100644 --- a/src/os/gfx/win32/os_gfx_win32.c +++ b/src/os/gfx/win32/os_gfx_win32.c @@ -1382,8 +1382,11 @@ internal void os_focus_external_window(OS_Handle handle) { HWND hwnd = (HWND)handle.u64[0]; - SetForegroundWindow(hwnd); - SetFocus(hwnd); + if(hwnd != 0) + { + SetForegroundWindow(hwnd); + SetFocus(hwnd); + } } ////////////////////////////////