[gtk+] wayland: Ensure the parent is committed after repositioning subsurfaces
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Ensure the parent is committed after repositioning subsurfaces
- Date: Wed, 27 Aug 2014 15:46:36 +0000 (UTC)
commit d34f2526c42b3c1915f01155acf16042dafa4bf3
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Aug 27 12:03:28 2014 +0200
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 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 6875099..e8b2ecf 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);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]