[gtk/scroll-event-propagation: 359/362] GDK W32: Use SWP_NOOWNERZORDER everywhere it can be applied



commit f64870f4afbcacc9707a8abf2d7d81ed9130ea07
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date:   Sun Jun 17 10:58:16 2018 +0000

    GDK W32: Use SWP_NOOWNERZORDER everywhere it can be applied
    
    There is no reason why we shouldn't pass this flag every time
    Z-order changes. We have separate routines that are used to
    maintain relative Z-order, so it should be completely OK to
    pass SWP_NOOWNERZORDER to let the OS know that it shouldn't try
    to maintain relative Z-order of the windows when raising them.

 gdk/win32/gdkevents-win32.c  |  6 +++---
 gdk/win32/gdksurface-win32.c | 16 ++++++++--------
 2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 73529b8ef9..ed31ba5b51 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -1701,7 +1701,7 @@ ensure_stacking_on_unminimize (MSG *msg)
                g_print (" restacking %p above %p",
                         msg->hwnd, lowest_transient));
       SetWindowPos (msg->hwnd, lowest_transient, 0, 0, 0, 0,
-                   SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
+                   SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
     }
 }
 
@@ -1782,7 +1782,7 @@ ensure_stacking_on_activate_app (MSG       *msg,
       impl->transient_owner != NULL)
     {
       SetWindowPos (msg->hwnd, HWND_TOP, 0, 0, 0, 0,
-                   SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
+                   SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
       return;
     }
 
@@ -1824,7 +1824,7 @@ ensure_stacking_on_activate_app (MSG       *msg,
                    g_print (" restacking %p above %p",
                             msg->hwnd, rover));
          SetWindowPos (msg->hwnd, rover, 0, 0, 0, 0,
-                       SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
+                       SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
           break;
        }
     }
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 0068242021..d52d099e2b 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -1118,7 +1118,7 @@ show_window_internal (GdkSurface *window,
       API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window),
                               (window->state & GDK_SURFACE_STATE_ABOVE)?HWND_TOPMOST:HWND_NOTOPMOST,
                               0, 0, 0, 0,
-                              SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
+                              SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
     }
 }
 
@@ -1386,7 +1386,7 @@ gdk_win32_surface_raise (GdkSurface *window)
       else
         API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window), HWND_TOP,
                                 0, 0, 0, 0,
-                                SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
+                                SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
     }
 }
 
@@ -1403,7 +1403,7 @@ gdk_win32_surface_lower (GdkSurface *window)
 
       API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window), HWND_BOTTOM,
                               0, 0, 0, 0,
-                              SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
+                              SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
     }
 }
 
@@ -2313,7 +2313,7 @@ _gdk_win32_surface_update_style_bits (GdkSurface *window)
   rect.right += after.right - before.right;
   rect.bottom += after.bottom - before.bottom;
 
-  flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION;
+  flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION | SWP_NOOWNERZORDER;
 
   if (will_be_topmost && !was_topmost)
     {
@@ -4767,7 +4767,7 @@ gdk_win32_surface_fullscreen (GdkSurface *window)
 
       API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window), HWND_TOP,
                 x, y, width, height,
-                SWP_NOCOPYBITS | SWP_SHOWWINDOW));
+                SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER));
     }
 }
 
@@ -4790,7 +4790,7 @@ gdk_win32_surface_unfullscreen (GdkSurface *window)
       API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window), HWND_NOTOPMOST,
                               fi->r.left, fi->r.top,
                               fi->r.right - fi->r.left, fi->r.bottom - fi->r.top,
-                              SWP_NOCOPYBITS | SWP_SHOWWINDOW));
+                              SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER));
 
       g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
       g_free (fi);
@@ -4816,7 +4816,7 @@ gdk_win32_surface_set_keep_above (GdkSurface *window,
       API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window),
                               setting ? HWND_TOPMOST : HWND_NOTOPMOST,
                               0, 0, 0, 0,
-                              SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
+                              SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
     }
 
   gdk_synthesize_surface_state (window,
@@ -4842,7 +4842,7 @@ gdk_win32_surface_set_keep_below (GdkSurface *window,
       API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window),
                               setting ? HWND_BOTTOM : HWND_NOTOPMOST,
                               0, 0, 0, 0,
-                              SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
+                              SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
     }
 
   gdk_synthesize_surface_state (window,


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