diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2015-06-17 17:31:19 +0800 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2015-06-17 17:41:31 +0800 |
commit | 0dab37c78fe261fc914e4a12d48e732726f13d43 (patch) | |
tree | 25c8b1a3193ee40efee38b29cbaf55b13839342f | |
parent | fb06b6e4b8cc312f56322b38b91af5b4c726bc33 (diff) | |
download | gtk+-0dab37c78fe261fc914e4a12d48e732726f13d43.tar.gz |
wayland: Always request transient commit when mapping subsurface
A subsurface positioning operation only takes effect when the parent
surfaces state is applied. If a subsurface is mapped and positioned, but
the parent surface state is not immediately committed, the relative
position of the subsurface is undefined and may be placed incorrectly.
To avoid this undefined state, always request that the parent surface
should be committed after mapping a subsurface so that the position
operation will take effect.
https://bugzilla.gnome.org/show_bug.cgi?id=751098
-rw-r--r-- | gdk/wayland/gdkwindow-wayland.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 4c448d70d5..e97175d707 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -158,6 +158,8 @@ static void gdk_wayland_window_configure (GdkWindow *window, static void maybe_set_gtk_surface_dbus_properties (GdkWindow *window); +static void gdk_window_request_transient_parent_commit (GdkWindow *window); + GType _gdk_window_impl_wayland_get_type (void); G_DEFINE_TYPE (GdkWindowImplWayland, _gdk_window_impl_wayland, GDK_TYPE_WINDOW_IMPL) @@ -882,6 +884,7 @@ gdk_wayland_window_create_subsurface (GdkWindow *window) impl->surface, parent_impl->surface); wl_subsurface_set_position (impl->subsurface, window->x, window->y); wl_subsurface_set_desync (impl->subsurface); + gdk_window_request_transient_parent_commit (window); } } |