[gnome-shell/wip/carlosg/no-event-source: 6/8] st: Move StButton 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: 6/8] st: Move StButton away from clutter_event_get_source()
- Date: Wed, 2 Mar 2022 10:19:08 +0000 (UTC)
commit d0b8a16c8dd998900c65a22d449f44112f6d0584
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Feb 25 16:11:09 2022 +0100
st: Move StButton away from clutter_event_get_source()
Ask the stage about the device actor instead.
src/st/st-button.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/st/st-button.c b/src/st/st-button.c
index 0e95bfaf09..3c6f5fddb6 100644
--- a/src/st/st-button.c
+++ b/src/st/st-button.c
@@ -219,9 +219,14 @@ st_button_button_release (ClutterActor *actor,
if (priv->button_mask & mask)
{
+ ClutterStage *stage;
+ ClutterActor *target;
gboolean is_click;
- is_click = priv->grabbed && clutter_actor_contains (actor, event->source);
+ stage = clutter_event_get_stage ((ClutterEvent *) event);
+ target = clutter_stage_get_event_actor (stage, (ClutterEvent *) event);
+
+ is_click = priv->grabbed && clutter_actor_contains (actor, target);
st_button_release (button, device, mask, is_click ? event->button : 0, NULL);
priv->grabbed &= ~mask;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]