[gtk/gtk-3-24: 1/4] gdk/wayland: Don't remap non-subsurface as subsurface
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/4] gdk/wayland: Don't remap non-subsurface as subsurface
- Date: Wed, 15 Aug 2018 22:04:50 +0000 (UTC)
commit 1ed53199c56cf8927efe417c05ab4424f32b30e5
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Aug 10 17:07:05 2018 +0200
gdk/wayland: Don't remap non-subsurface as subsurface
Let's just use the fact that a window was mapped as a subsurface to
remap it above another transient parent instead of relying on the more
complicated 'should-map-as-subsurface' helper function.
gdk/wayland/gdkwindow-wayland.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 3da3ac5b68..fa3e0e48a0 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -3799,6 +3799,7 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
GdkWaylandDisplay *display_wayland =
GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
GdkWindow *previous_parent;
+ gboolean was_subsurface = FALSE;
g_assert (parent == NULL ||
gdk_window_get_display (window) == gdk_window_get_display (parent));
@@ -3812,7 +3813,10 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
unset_transient_for_exported (window);
if (impl->display_server.wl_subsurface)
- unmap_subsurface (window);
+ {
+ was_subsurface = TRUE;
+ unmap_subsurface (window);
+ }
previous_parent = impl->transient_for;
impl->transient_for = parent;
@@ -3825,9 +3829,10 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
display_wayland->orphan_dialogs =
g_list_remove (display_wayland->orphan_dialogs, window);
}
+
gdk_wayland_window_sync_parent (window, NULL);
- if (should_map_as_subsurface (window) &&
- parent && gdk_window_is_visible (window))
+
+ if (was_subsurface && parent)
gdk_wayland_window_create_subsurface (window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]