[gnome-shell/wip/carlosg/no-event-source: 19/21] 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: 19/21] st: Move StButton away from clutter_event_get_source()
- Date: Fri, 25 Feb 2022 16:10:17 +0000 (UTC)
commit 54315e0c8bd5da327d15f188a8a1853054edfcab
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 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/st/st-button.c b/src/st/st-button.c
index 0e95bfaf09..7033e58bf7 100644
--- a/src/st/st-button.c
+++ b/src/st/st-button.c
@@ -219,9 +219,12 @@ st_button_button_release (ClutterActor *actor,
if (priv->button_mask & mask)
{
+ ClutterActor *target;
gboolean is_click;
- is_click = priv->grabbed && clutter_actor_contains (actor, event->source);
+ target = clutter_stage_get_device_actor (clutter_event_get_stage (event),
+ device, NULL);
+ 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]