diff --git a/gtk3-restore-filechooser-click-behavior.patch b/gtk3-restore-filechooser-click-behavior.patch new file mode 100644 index 0000000..8a6a6e4 --- /dev/null +++ b/gtk3-restore-filechooser-click-behavior.patch @@ -0,0 +1,79 @@ +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 + +@@ -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; + diff --git a/gtk3.changes b/gtk3.changes index e0f7376..f2d19cb 100644 --- a/gtk3.changes +++ b/gtk3.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Oct 11 04:18:16 UTC 2017 - yfjiang@suse.com + +- Add gtk3-restore-filechooser-click-behavior.patch: The + clicking behavior 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). + ------------------------------------------------------------------- Wed Oct 4 17:25:48 UTC 2017 - zaitor@opensuse.org diff --git a/gtk3.spec b/gtk3.spec index e92ed11..3cbeee7 100644 --- a/gtk3.spec +++ b/gtk3.spec @@ -46,6 +46,8 @@ Patch0: gtk3-GTK_PATH64.patch Patch1: gtk3-path-local.patch # PATCH-FIX-UPSTREAM gtk3-silence-log-spew-blank-cursors.patch bgo#775217 zaitor@opensuse.org -- wayland: Don't spew warnings for blank cursors Patch2: gtk3-silence-log-spew-blank-cursors.patch +# PATCH-FIX-OPENSUSE gtk3-restore-filechooser-click-behavior.patch bgo#758065 bsc#1057471 yfjiang@suse.com -- revert upstream commit#fb0a13b to restore the single click behavior +Patch3: gtk3-restore-filechooser-click-behavior.patch BuildRequires: cups-devel >= 1.2 BuildRequires: docbook-xsl-stylesheets BuildRequires: fdupes @@ -366,6 +368,7 @@ cp -a %{S:1} . # Patch disabled, needs rebase. #patch1 -p0 %patch2 -p1 +%patch3 -p1 %build # Disabled since patch 1 is in need of rebase