st: Move StButton away from clutter_event_get_source()
Ask the stage about the device actor instead. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
This commit is contained in:
parent
6d895bf8a9
commit
7b7e5ac0de
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user