52 lines
1.9 KiB
Diff
52 lines
1.9 KiB
Diff
|
From 44fc67626b6dbaee79c49fd87b20c42405d9decc Mon Sep 17 00:00:00 2001
|
||
|
From: Carlos Garnacho <carlosg@gnome.org>
|
||
|
Date: Wed, 9 Aug 2023 16:00:49 +0200
|
||
|
Subject: [PATCH] clutter: Trigger repick on animation-less transform changes
|
||
|
|
||
|
We have a mechanism to trigger repick after animations on
|
||
|
clutter_actor_set_final_state(), but this will not happen if
|
||
|
animations are disabled.
|
||
|
|
||
|
In this case, shell transitions and other typically animatable
|
||
|
changes on the transform of actors will not naturally trigger
|
||
|
a pointer repick when those get instantly changed to the final
|
||
|
state, possibly preserving the cached state and missing the
|
||
|
just popped in actor altogether.
|
||
|
|
||
|
Trigger an instant repick on animation-less transform changes,
|
||
|
so that these situations are also handled correctly, and the
|
||
|
pointer drops the cached state and is able to find the new
|
||
|
actor.
|
||
|
|
||
|
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2918
|
||
|
---
|
||
|
clutter/clutter/clutter-actor.c | 5 +++++
|
||
|
1 file changed, 5 insertions(+)
|
||
|
|
||
|
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
|
||
|
index 99b42cfe9d..8495e06f79 100644
|
||
|
--- a/clutter/clutter/clutter-actor.c
|
||
|
+++ b/clutter/clutter/clutter-actor.c
|
||
|
@@ -1004,6 +1004,8 @@ static void push_in_paint_unmapped_branch (ClutterActor *self,
|
||
|
static void pop_in_paint_unmapped_branch (ClutterActor *self,
|
||
|
guint count);
|
||
|
|
||
|
+static void clutter_actor_update_pointer (ClutterActor *self);
|
||
|
+
|
||
|
static GQuark quark_actor_layout_info = 0;
|
||
|
static GQuark quark_actor_transform_info = 0;
|
||
|
static GQuark quark_actor_animation_info = 0;
|
||
|
@@ -2447,6 +2449,9 @@ transform_changed (ClutterActor *actor)
|
||
|
absolute_geometry_changed_cb,
|
||
|
NULL,
|
||
|
NULL);
|
||
|
+
|
||
|
+ if (!clutter_actor_has_transitions (actor))
|
||
|
+ clutter_actor_update_pointer (actor);
|
||
|
}
|
||
|
|
||
|
/*< private >
|
||
|
--
|
||
|
GitLab
|
||
|
|