[gtk+] treeview: Add back a check to ignore buttons > 3
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Add back a check to ignore buttons > 3
- Date: Tue, 22 Jul 2014 11:22:19 +0000 (UTC)
commit 0bb955b30ea3d46f8c7de6b0f2dd1f3b13efa9ba
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jul 22 13:03:22 2014 +0200
treeview: Add back a check to ignore buttons > 3
The removal was not intentional, and still needed as the GtkGestureMultiPress
will work for any button unless told to lock on a single specific one.
gtk/gtktreeview.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index e648ffc..5e24060 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -3078,13 +3078,19 @@ gtk_tree_view_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
"vertical-separator", &vertical_separator,
"horizontal-separator", &horizontal_separator,
NULL);
+ button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
+
+ if (button > 3)
+ {
+ gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);
+ return;
+ }
/* Because grab_focus can cause reentrancy, we delay grab_focus until after
* we're done handling the button press.
*/
gtk_tree_view_convert_widget_to_bin_window_coords (tree_view, x, y,
&bin_x, &bin_y);
- button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
if (n_press > 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]