wayland/actor-surface: Always consider unmapped actors not on output

This avoids using bogus geometric values from an unmapped actor to
determine whether an actor is on a logical monitor or not. This would
happen when committing to a subsurface of a yet to be mapped toplevel.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/961
This commit is contained in:
Jonas Ådahl 2019-12-06 22:20:45 +01:00 committed by Georges Basile Stavracas Neto
parent 3e90070b88
commit 6d15231f10

View File

@ -292,6 +292,9 @@ meta_wayland_actor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *surfac
MetaRectangle logical_monitor_layout; MetaRectangle logical_monitor_layout;
gboolean is_on_monitor; gboolean is_on_monitor;
if (!clutter_actor_is_mapped (actor))
return FALSE;
clutter_actor_get_transformed_position (actor, &x, &y); clutter_actor_get_transformed_position (actor, &x, &y);
clutter_actor_get_transformed_size (actor, &width, &height); clutter_actor_get_transformed_size (actor, &width, &height);