[gnome-shell] st-button: Don't rely on hover to accept clicks
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-button: Don't rely on hover to accept clicks
- Date: Wed, 7 Oct 2015 13:06:20 +0000 (UTC)
commit 464d5d8a13e41c4495301071de0d04f9fde726f5
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Oct 7 01:21:02 2015 +0200
st-button: Don't rely on hover to accept clicks
Since commit 4f1f226828 we only consider buttons clicked when the
release event had a corresponding press event. However as we use
the hover state to check whether a release event actually occurred
on the button, we dismiss any clicks in cases where we missed the
enter event - most likely due to some other actor holding a grab.
Instead, check whether the button contains the event's source, which
should be less error-prone.
https://bugzilla.gnome.org/show_bug.cgi?id=748919
src/st/st-button.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/st/st-button.c b/src/st/st-button.c
index f47ce21..78a931f 100644
--- a/src/st/st-button.c
+++ b/src/st/st-button.c
@@ -211,7 +211,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, device, mask, is_click ? event->button : 0, NULL);
button->priv->grabbed &= ~mask;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]