summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes <andre@endlessm.com>2020-03-31 21:11:19 +0000
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2020-03-31 23:12:44 +0000
commit82f3bdd14e0081dff60e9fed51376fc4cbf8b201 (patch)
treec107f5aca3e711920f6e7571cc730edd65b84713
parent52e5d6fc948ecd7d78c3bddf2cff13eb3c386f4c (diff)
downloadmutter-82f3bdd14e0081dff60e9fed51376fc4cbf8b201.tar.gz
clutter/actor: Fix pick when actor is not allocated
When selecting the pick regions for an actor we were not considering whether the actor was allocated and that was causing issues where the preferred width/height of the actor was used when deciding whether the actor should be considered as a pick target. Check if the actor has a valid allocation, in addition to being mapped and being in pick mode, in clutter_actor_should_pick_paint(). https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1169 (cherry picked from commit 902302a174483eabe796227a3fc82a36770f40b2)
-rw-r--r--clutter/clutter/clutter-actor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 56eaad611..b82d847a4 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -2410,6 +2410,7 @@ clutter_actor_should_pick_paint (ClutterActor *self)
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
if (CLUTTER_ACTOR_IS_MAPPED (self) &&
+ clutter_actor_has_allocation (self) &&
(_clutter_context_get_pick_mode () == CLUTTER_PICK_ALL ||
CLUTTER_ACTOR_IS_REACTIVE (self)))
return TRUE;