Dominique Leuenberger
2f4a12f181
The clicking behaviour introduced by commit#fb0a13b has confused many users in the past 2 years. By reverting the commit, the patch makes the primary button clicking behave as consistent as most users has been used to (bgo#758065 bsc#1057471). Some ideas to change this was raised up in the quoted bugs and the following declining of patch, while we did not see a clear trend from upstream to improve this in short term https://mail.gnome.org/archives/gtk-devel-list/2017-October/msg00002.html Still we will be working in upstream with more easily "merge-able" improvements on this. OBS-URL: https://build.opensuse.org/request/show/533214 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk3?expand=0&rev=295
80 lines
2.5 KiB
Diff
80 lines
2.5 KiB
Diff
Index: gtk+-3.22.24/gtk/gtkfilechooserwidget.c
|
|
===================================================================
|
|
--- gtk+-3.22.24.orig/gtk/gtkfilechooserwidget.c
|
|
+++ gtk+-3.22.24/gtk/gtkfilechooserwidget.c
|
|
@@ -77,7 +77,6 @@
|
|
#include "gtkseparator.h"
|
|
#include "gtkmodelbutton.h"
|
|
#include "gtkgesturelongpress.h"
|
|
-#include "gtkdebug.h"
|
|
|
|
#include <cairo-gobject.h>
|
|
|
|
@@ -2379,25 +2378,6 @@ list_popup_menu_cb (GtkWidget
|
|
return TRUE;
|
|
}
|
|
|
|
-static void
|
|
-get_selection_modifiers (GtkWidget *widget,
|
|
- GdkEventButton *event,
|
|
- gboolean *modify,
|
|
- gboolean *extend)
|
|
-{
|
|
- GdkModifierType mask;
|
|
-
|
|
- *modify = FALSE;
|
|
- *extend = FALSE;
|
|
-
|
|
- mask = gtk_widget_get_modifier_mask (widget, GDK_MODIFIER_INTENT_MODIFY_SELECTION);
|
|
- if ((event->state & mask) == mask)
|
|
- *modify = TRUE;
|
|
- mask = gtk_widget_get_modifier_mask (widget, GDK_MODIFIER_INTENT_EXTEND_SELECTION);
|
|
- if ((event->state & mask) == mask)
|
|
- *extend = TRUE;
|
|
-}
|
|
-
|
|
/* Callback used when a button is pressed on the file list. We trap button 3 to
|
|
* bring up a popup menu.
|
|
*/
|
|
@@ -2408,40 +2388,10 @@ list_button_press_event_cb (GtkWidget
|
|
{
|
|
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
|
static gboolean in_press = FALSE;
|
|
- GtkTreePath *path;
|
|
- GtkTreeViewColumn *column;
|
|
- GdkDevice *device;
|
|
- gboolean modify, extend, is_touchscreen;
|
|
|
|
if (in_press)
|
|
return FALSE;
|
|
|
|
- device = gdk_event_get_source_device ((GdkEvent *) event);
|
|
- is_touchscreen = gtk_simulate_touchscreen () ||
|
|
- gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN;
|
|
-
|
|
- get_selection_modifiers (widget, event, &modify, &extend);
|
|
- if (!is_touchscreen &&
|
|
- !modify && !extend &&
|
|
- event->type == GDK_BUTTON_PRESS &&
|
|
- event->button == GDK_BUTTON_PRIMARY &&
|
|
- gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->browse_files_tree_view),
|
|
- event->x, event->y,
|
|
- &path, &column, NULL, NULL))
|
|
- {
|
|
- GtkTreeSelection *selection;
|
|
-
|
|
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
|
|
- if (gtk_tree_selection_path_is_selected (selection, path))
|
|
- {
|
|
- list_row_activated (GTK_TREE_VIEW (priv->browse_files_tree_view), path, column, impl);
|
|
- gtk_tree_path_free (path);
|
|
- return TRUE;
|
|
- }
|
|
-
|
|
- gtk_tree_path_free (path);
|
|
- }
|
|
-
|
|
if (!gdk_event_triggers_context_menu ((GdkEvent *) event))
|
|
return FALSE;
|
|
|