From c7277581f8b221781f5b70fa3f1d5d84f18f115c Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 8 Sep 2024 15:16:40 +0200 Subject: [PATCH] app: [Window] don't report Win32ViewEvent before window configuration Fixes: https://todo.sr.ht/~eliasnaur/gio/609 Signed-off-by: Elias Naur --- app/os_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/os_windows.go b/app/os_windows.go index 3745e86e..1dbc067c 100644 --- a/app/os_windows.go +++ b/app/os_windows.go @@ -107,8 +107,8 @@ func newWindow(win *callbacks, options []Option) { } winMap.Store(w.hwnd, w) defer winMap.Delete(w.hwnd) - w.ProcessEvent(Win32ViewEvent{HWND: uintptr(w.hwnd)}) w.Configure(options) + w.ProcessEvent(Win32ViewEvent{HWND: uintptr(w.hwnd)}) windows.SetForegroundWindow(w.hwnd) windows.SetFocus(w.hwnd) // Since the window class for the cursor is null,