[gnome-shell/wip/carlosg/no-event-source: 3/3] st: Move StWidget away from clutter_event_get_source()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/no-event-source: 3/3] st: Move StWidget away from clutter_event_get_source()
- Date: Fri, 25 Feb 2022 16:14:12 +0000 (UTC)
commit c0fe23dde9c99970c5397e71a2c8e3b2427b15d2
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Feb 25 16:13:16 2022 +0100
st: Move StWidget away from clutter_event_get_source()
Ask the stage about the device actor instead for hover tracking.
src/st/st-widget.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index e131a5108a..e9a1ef9012 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -692,7 +692,17 @@ st_widget_enter (ClutterActor *actor,
if (priv->track_hover)
{
- if (clutter_actor_contains (actor, event->source))
+ ClutterStage *stage;
+ ClutterInputDevice *device;
+ ClutterEventSequence *sequence;
+ ClutterActor *target;
+
+ stage = clutter_event_get_stage ((ClutterEvent *) event);
+ device = clutter_event_get_device ((ClutterEvent *) event);
+ sequence = clutter_event_get_event_sequence ((ClutterEvent *) event);
+ target = clutter_stage_get_device_actor (stage, device, sequence);
+
+ if (clutter_actor_contains (actor, target))
st_widget_set_hover (ST_WIDGET (actor), TRUE);
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]