From 5cf657065e61ebe2aa73fd93cb44bbad83f3cc7d Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sat, 25 Jun 2022 10:35:58 +0100 Subject: [PATCH] app: [Windows] use SWP_NOZORDER instead of SWP_NOOWNERZORDER As I read the SetWindowPos documentation, SWP_NOZORDER is the correct flag for keeping the z-order of the window. Signed-off-by: Elias Naur --- app/os_windows.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/os_windows.go b/app/os_windows.go index 78d8fa86..7357ca76 100644 --- a/app/os_windows.go +++ b/app/os_windows.go @@ -624,7 +624,7 @@ func (w *window) Configure(options []Option) { y := wr.Top dx := r.Right - r.Left dy := r.Bottom - r.Top - windows.SetWindowPos(w.hwnd, 0, x, y, dx, dy, windows.SWP_NOOWNERZORDER|windows.SWP_FRAMECHANGED) + windows.SetWindowPos(w.hwnd, 0, x, y, dx, dy, windows.SWP_NOZORDER|windows.SWP_FRAMECHANGED) windows.ShowWindow(w.hwnd, windows.SW_SHOWNORMAL) case Fullscreen: @@ -636,7 +636,7 @@ func (w *window) Configure(options []Option) { mi.Monitor.Left, mi.Monitor.Top, mi.Monitor.Right-mi.Monitor.Left, mi.Monitor.Bottom-mi.Monitor.Top, - windows.SWP_NOOWNERZORDER|windows.SWP_FRAMECHANGED, + windows.SWP_NOZORDER|windows.SWP_FRAMECHANGED, ) windows.ShowWindow(w.hwnd, windows.SW_SHOW) } @@ -760,7 +760,7 @@ func (w *window) Perform(acts system.Action) { mi := windows.GetMonitorInfo(w.hwnd).Monitor x := (mi.Right - mi.Left - dx) / 2 y := (mi.Bottom - mi.Top - dy) / 2 - windows.SetWindowPos(w.hwnd, 0, x, y, dx, dy, windows.SWP_NOOWNERZORDER|windows.SWP_FRAMECHANGED) + windows.SetWindowPos(w.hwnd, 0, x, y, dx, dy, windows.SWP_NOZORDER|windows.SWP_FRAMECHANGED) case system.ActionRaise: w.raise() case system.ActionClose: