diff options
Diffstat (limited to 'src/wayland/meta-wayland-subsurface.c')
-rw-r--r-- | src/wayland/meta-wayland-subsurface.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c index 6a50b3299..ba86d6206 100644 --- a/src/wayland/meta-wayland-subsurface.c +++ b/src/wayland/meta-wayland-subsurface.c @@ -28,6 +28,7 @@ #include "wayland/meta-wayland-actor-surface.h" #include "wayland/meta-wayland-buffer.h" #include "wayland/meta-wayland-surface.h" +#include "wayland/meta-wayland-transaction.h" #include "wayland/meta-window-wayland.h" struct _MetaWaylandSubsurface @@ -106,28 +107,6 @@ is_sibling (MetaWaylandSurface *surface, } void -meta_wayland_subsurface_parent_state_applied (MetaWaylandSubsurface *subsurface) -{ - MetaWaylandSurfaceRole *surface_role = META_WAYLAND_SURFACE_ROLE (subsurface); - MetaWaylandActorSurface *actor_surface = - META_WAYLAND_ACTOR_SURFACE (subsurface); - MetaWaylandSurface *surface = - meta_wayland_surface_role_get_surface (surface_role); - - if (surface->sub.pending_pos) - { - surface->sub.x = surface->sub.pending_x; - surface->sub.y = surface->sub.pending_y; - surface->sub.pending_pos = FALSE; - } - - if (meta_wayland_surface_is_synchronized (surface)) - meta_wayland_surface_apply_cached_state (surface); - - meta_wayland_actor_surface_sync_actor_state (actor_surface); -} - -void meta_wayland_subsurface_union_geometry (MetaWaylandSubsurface *subsurface, int parent_x, int parent_y, @@ -452,7 +431,13 @@ wl_subsurface_set_desync (struct wl_client *client, meta_wayland_surface_is_synchronized (surface->sub.parent); if (!is_parent_effectively_synchronized) - meta_wayland_surface_apply_cached_state (surface); + { + MetaWaylandTransaction *transaction; + + transaction = meta_wayland_transaction_new (surface->compositor); + meta_wayland_transaction_add_cached_states (transaction, surface); + meta_wayland_transaction_commit (transaction); + } surface->sub.synchronous = FALSE; } |