summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2018-06-17 10:48:48 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2018-06-17 10:48:48 +0000
commitfc2008f24073348f97751e2031761b6f388edabe (patch)
treecbc7221c483057a9d4937ca22b16ad3a0d72d62b
parent96be612c48dfb527e5f789fdf6856b7f466900ef (diff)
downloadgtk+-lrn/zorder-324.tar.gz
GDK W32: Use SWP_NOOWNERZORDER everywhere it can be appliedlrn/zorder-324
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.
-rw-r--r--gdk/win32/gdkevents-win32.c6
-rw-r--r--gdk/win32/gdkwindow-win32.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index a2cd67cf03..249a6b4c43 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -1929,7 +1929,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);
}
}
@@ -2010,7 +2010,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;
}
@@ -2052,7 +2052,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/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index a4f7f1d3df..cc1f156ad1 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -1463,7 +1463,7 @@ show_window_internal (GdkWindow *window,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
(window->state & GDK_WINDOW_STATE_ABOVE)?HWND_TOPMOST:HWND_NOTOPMOST,
0, 0, 0, 0,
- SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
+ SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
}
}
@@ -1822,7 +1822,7 @@ gdk_win32_window_raise (GdkWindow *window)
else
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
0, 0, 0, 0,
- SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
+ SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
}
}
@@ -1839,7 +1839,7 @@ gdk_win32_window_lower (GdkWindow *window)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_BOTTOM,
0, 0, 0, 0,
- SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
+ SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
}
}
@@ -2896,7 +2896,7 @@ _gdk_win32_window_update_style_bits (GdkWindow *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)
{
@@ -5334,7 +5334,7 @@ gdk_win32_window_fullscreen (GdkWindow *window)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
x, y, width, height,
- SWP_NOCOPYBITS | SWP_SHOWWINDOW));
+ SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER));
}
}
@@ -5357,7 +5357,7 @@ gdk_win32_window_unfullscreen (GdkWindow *window)
API_CALL (SetWindowPos, (GDK_WINDOW_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);
@@ -5383,7 +5383,7 @@ gdk_win32_window_set_keep_above (GdkWindow *window,
API_CALL (SetWindowPos, (GDK_WINDOW_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_window_state (window,
@@ -5409,7 +5409,7 @@ gdk_win32_window_set_keep_below (GdkWindow *window,
API_CALL (SetWindowPos, (GDK_WINDOW_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_window_state (window,