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.
This commit is contained in:
Carlos Garnacho 2014-08-27 12:03:28 +02:00
parent e6199af60d
commit d34f2526c4

View File

@ -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);
}
}
}