st-button.c: Don't rely on hover state to accept clicks

When a button is pressed and the pointer is dragged onto another button,
the second button's enter event goes to the grabbing button, so its hover
state stays false and later clicks on it are ignored. Check whether the
release event's source is inside the button instead.

Fixes #14019
This commit is contained in:
dualfroz committed 2026-10-14 18:04:22 +02:00
1 parent 4c2c6bb893
commit eb0adeeed1
1 file changed
+1 -1
+1 -1
View File
@@ -192,7 +192,7 @@ st_button_button_release (ClutterActor *actor,
{
gboolean is_click;
is_click = button->priv->grabbed && st_widget_get_hover (ST_WIDGET (button));
is_click = button->priv->grabbed && clutter_actor_contains (actor, event->source);
st_button_release (button, mask, is_click ? event->button : 0);
button->priv->grabbed &= ~mask;