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.
This commit is contained in:
Carlos Garnacho 2014-07-22 13:03:22 +02:00
parent 4f27e8c4df
commit 0bb955b30e

View File

@ -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)