mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
wayland/surface: Make cached subsurface state generic
This moves the cached subsurface surface state into the generic MetaWaylandSurface namespace. Eventually it'll be used by other surface roles which as well aim to implement synhcronization. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
This commit is contained in:
@ -189,7 +189,7 @@ meta_wayland_subsurface_parent_state_applied (MetaWaylandSubsurface *subsurface)
|
||||
}
|
||||
|
||||
if (is_surface_effectively_synchronized (surface))
|
||||
meta_wayland_surface_apply_state (surface, surface->sub.pending);
|
||||
meta_wayland_surface_apply_cached_state (surface);
|
||||
|
||||
meta_wayland_actor_surface_sync_actor_state (actor_surface);
|
||||
}
|
||||
@ -356,7 +356,6 @@ wl_subsurface_destructor (struct wl_resource *resource)
|
||||
surface->sub.parent = NULL;
|
||||
}
|
||||
|
||||
g_clear_object (&surface->sub.pending);
|
||||
surface->wl_subsurface = NULL;
|
||||
}
|
||||
|
||||
@ -485,7 +484,7 @@ wl_subsurface_set_desync (struct wl_client *client,
|
||||
|
||||
if (was_effectively_synchronized &&
|
||||
!is_surface_effectively_synchronized (surface))
|
||||
meta_wayland_surface_apply_state (surface, surface->sub.pending);
|
||||
meta_wayland_surface_apply_cached_state (surface);
|
||||
}
|
||||
|
||||
static const struct wl_subsurface_interface meta_wayland_wl_subsurface_interface = {
|
||||
@ -561,7 +560,6 @@ wl_subcompositor_get_subsurface (struct wl_client *client,
|
||||
surface,
|
||||
wl_subsurface_destructor);
|
||||
|
||||
surface->sub.pending = g_object_new (META_TYPE_WAYLAND_SURFACE_STATE, NULL);
|
||||
surface->sub.synchronous = TRUE;
|
||||
surface->sub.parent = parent;
|
||||
surface->sub.parent_destroy_listener.notify =
|
||||
|
Reference in New Issue
Block a user