|
|
ab48da |
From 0365b1f803ef181d5f806b3a8b77afe6c5edbf91 Mon Sep 17 00:00:00 2001
|
|
|
ab48da |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
ab48da |
Date: Wed, 7 Oct 2015 01:21:02 +0200
|
|
|
ab48da |
Subject: [PATCH] st-button: Don't rely on hover to accept clicks
|
|
|
ab48da |
|
|
|
ab48da |
Since commit 4f1f226828 we only consider buttons clicked when the
|
|
|
ab48da |
release event had a corresponding press event. However as we use
|
|
|
ab48da |
the hover state to check whether a release event actually occurred
|
|
|
ab48da |
on the button, we dismiss any clicks in cases where we missed the
|
|
|
ab48da |
enter event - most likely due to some other actor holding a grab.
|
|
|
ab48da |
Instead, check whether the button contains the event's source, which
|
|
|
ab48da |
should be less error-prone.
|
|
|
ab48da |
|
|
|
ab48da |
https://bugzilla.gnome.org/show_bug.cgi?id=748919
|
|
|
ab48da |
---
|
|
|
ab48da |
src/st/st-button.c | 2 +-
|
|
|
ab48da |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
ab48da |
|
|
|
ab48da |
diff --git a/src/st/st-button.c b/src/st/st-button.c
|
|
|
ab48da |
index 56502f1..0db6b0d 100644
|
|
|
ab48da |
--- a/src/st/st-button.c
|
|
|
ab48da |
+++ b/src/st/st-button.c
|
|
|
ab48da |
@@ -211,7 +211,7 @@ st_button_button_release (ClutterActor *actor,
|
|
|
ab48da |
{
|
|
|
ab48da |
gboolean is_click;
|
|
|
ab48da |
|
|
|
ab48da |
- is_click = button->priv->grabbed && st_widget_get_hover (ST_WIDGET (button));
|
|
|
ab48da |
+ is_click = button->priv->grabbed && clutter_actor_contains (actor, event->source);
|
|
|
ab48da |
st_button_release (button, device, mask, is_click ? event->button : 0, NULL);
|
|
|
ab48da |
|
|
|
ab48da |
button->priv->grabbed &= ~mask;
|
|
|
ab48da |
--
|
|
|
ab48da |
2.7.2
|
|
|
ab48da |
|