From d34f2526c42b3c1915f01155acf16042dafa4bf3 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 27 Aug 2014 12:03:28 +0200 Subject: [PATCH] wayland: Ensure the parent is committed after repositioning subsurfaces Subsurface position is deemed part of the state of the parent surface, so ensure wl_surface_commit() happens on the parent surface if none is scheduled, so the repositioning takes place. --- gdk/wayland/gdkwindow-wayland.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 6875099d0e..e8b2ecf2e1 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -1265,7 +1265,17 @@ gdk_window_wayland_move_resize (GdkWindow *window, window->y = y; if (impl->subsurface) - wl_subsurface_set_position (impl->subsurface, x, y); + { + GdkWindowImplWayland *parent_impl; + + wl_subsurface_set_position (impl->subsurface, x, y); + + g_assert (impl->transient_for != NULL); + parent_impl = GDK_WINDOW_IMPL_WAYLAND (impl->transient_for->impl); + + if (parent_impl->surface && !parent_impl->pending_commit) + wl_surface_commit (parent_impl->surface); + } } }