[gtk+/gtk-3-14] gtklabel: Don't accept unhandled mouse buttons
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] gtklabel: Don't accept unhandled mouse buttons
- Date: Fri, 9 Jan 2015 02:58:43 +0000 (UTC)
commit 393e4205ec55fbda539365284f17040b53c4ed96
Author: Timm Bäder <mail baedert org>
Date: Fri Dec 26 23:04:37 2014 +0100
gtklabel: Don't accept unhandled mouse buttons
If the pressed mouse button neither triggers a context menu nor
activates a link, set the sequence's state to DENIED.
https://bugzilla.gnome.org/show_bug.cgi?id=742010
gtk/gtklabel.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 2c9e007..d37e933 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -4895,6 +4895,11 @@ gtk_label_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
gtk_label_select_word (label);
}
}
+ else
+ {
+ gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);
+ return;
+ }
if (n_press >= 3)
gtk_event_controller_reset (GTK_EVENT_CONTROLLER (gesture));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]