wayland/actor-surface: Reset the actor on role-assignment
This makes sure we always have new SurfaceActors when reassigning the same role to a previously used surface Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3667>
This commit is contained in:

committed by
Marge Bot

parent
807c99fca6
commit
e775052429
@ -48,14 +48,6 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (MetaWaylandActorSurface,
|
|||||||
meta_wayland_actor_surface,
|
meta_wayland_actor_surface,
|
||||||
META_TYPE_WAYLAND_SURFACE_ROLE)
|
META_TYPE_WAYLAND_SURFACE_ROLE)
|
||||||
|
|
||||||
static void
|
|
||||||
meta_wayland_actor_surface_constructed (GObject *object)
|
|
||||||
{
|
|
||||||
G_OBJECT_CLASS (meta_wayland_actor_surface_parent_class)->constructed (object);
|
|
||||||
|
|
||||||
meta_wayland_actor_surface_reset_actor (META_WAYLAND_ACTOR_SURFACE (object));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clear_surface_actor (MetaWaylandActorSurface *actor_surface)
|
clear_surface_actor (MetaWaylandActorSurface *actor_surface)
|
||||||
{
|
{
|
||||||
@ -107,6 +99,8 @@ meta_wayland_actor_surface_assigned (MetaWaylandSurfaceRole *surface_role)
|
|||||||
MetaWaylandSurface *surface =
|
MetaWaylandSurface *surface =
|
||||||
meta_wayland_surface_role_get_surface (surface_role);
|
meta_wayland_surface_role_get_surface (surface_role);
|
||||||
|
|
||||||
|
meta_wayland_actor_surface_reset_actor (META_WAYLAND_ACTOR_SURFACE (surface_role));
|
||||||
|
|
||||||
if (wl_list_empty (&surface->unassigned.pending_frame_callback_list))
|
if (wl_list_empty (&surface->unassigned.pending_frame_callback_list))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -378,7 +372,6 @@ meta_wayland_actor_surface_class_init (MetaWaylandActorSurfaceClass *klass)
|
|||||||
META_WAYLAND_SURFACE_ROLE_CLASS (klass);
|
META_WAYLAND_SURFACE_ROLE_CLASS (klass);
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructed = meta_wayland_actor_surface_constructed;
|
|
||||||
object_class->dispose = meta_wayland_actor_surface_dispose;
|
object_class->dispose = meta_wayland_actor_surface_dispose;
|
||||||
|
|
||||||
surface_role_class->assigned = meta_wayland_actor_surface_assigned;
|
surface_role_class->assigned = meta_wayland_actor_surface_assigned;
|
||||||
|
Reference in New Issue
Block a user