[gtk/win32.modal] GDK/Win32: Fix restacking on (re-)activation



commit 6e004474debaf7a17afa9f3b728e42c3879bc646
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Oct 6 16:10:47 2020 +0800

    GDK/Win32: Fix restacking on (re-)activation
    
    Just take into account the Z-order when calling SetWindowPos() instead of
    explicitly re-stacking the windows.  This will ensure that dialog boxes and
    pickers do not somehow fall behind another (gtk)window, and avoids spews of
    warnings when we put a parent window of a popover before the popover itself

 gdk/win32/gdkevents-win32.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 39546390a2..e3b1dab207 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -1747,8 +1747,7 @@ ensure_stacking_on_activate_app (MSG       *msg,
       while (owner != NULL)
         {
           SetWindowPos (GDK_SURFACE_HWND (owner), GDK_SURFACE_HWND (child), 0, 0, 0, 0,
-                        SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
-          restack_children (owner);
+                        SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
           child = owner;
           owner = GDK_WIN32_SURFACE (owner)->transient_owner;
         }
@@ -3317,7 +3316,6 @@ gdk_event_translate (MSG *msg,
       if (msg->wParam && GDK_SURFACE_IS_MAPPED (window))
        {
          ensure_stacking_on_activate_app (msg, window);
-         restack_children (window);
        }
       break;
     case WM_NCHITTEST:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]