[gtk3/f20] Backport a fix for opening popup menus with the menu key
Kalev Lember
kalev at fedoraproject.org
Mon Aug 25 19:37:27 UTC 2014
commit 09cb1783a892885e316cf6226dfc3a0ebd7d6f16
Author: Kalev Lember <kalevlember at gmail.com>
Date: Mon Aug 25 20:36:33 2014 +0200
Backport a fix for opening popup menus with the menu key
https://bugzilla.gnome.org/show_bug.cgi?id=722106
0001-Don-t-implement-popup_menu-in-GtkWindow.patch | 52 ++++++++++++++++++++
gtk3.spec | 9 +++-
2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/0001-Don-t-implement-popup_menu-in-GtkWindow.patch b/0001-Don-t-implement-popup_menu-in-GtkWindow.patch
new file mode 100644
index 0000000..55c4059
--- /dev/null
+++ b/0001-Don-t-implement-popup_menu-in-GtkWindow.patch
@@ -0,0 +1,52 @@
+From 3217246e94a4ed4d844a64e369e844699d834c15 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Mon, 13 Jan 2014 22:59:59 -0500
+Subject: [PATCH] Don't implement popup_menu in GtkWindow
+
+This leads to disastruous results, since each menu is itself
+in a GtkWindow, so holding down the menu key leads to a neverending
+cascade of menus on top of menus.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=722106
+---
+ gtk/gtkwindow.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
+index 5be879a..8ea9de8 100644
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -479,7 +479,6 @@ static void gtk_window_on_theme_variant_changed (GtkSettings *settings,
+ #endif
+ static void gtk_window_set_theme_variant (GtkWindow *window);
+
+-static gboolean gtk_window_popup_menu (GtkWidget *widget);
+ static void gtk_window_do_popup (GtkWindow *window,
+ GdkEventButton *event);
+
+@@ -663,7 +662,6 @@ gtk_window_class_init (GtkWindowClass *klass)
+ widget_class->direction_changed = gtk_window_direction_changed;
+ widget_class->state_changed = gtk_window_state_changed;
+ widget_class->style_updated = gtk_window_style_updated;
+- widget_class->popup_menu = gtk_window_popup_menu;
+ widget_class->get_preferred_width = gtk_window_get_preferred_width;
+ widget_class->get_preferred_width_for_height = gtk_window_get_preferred_width_for_height;
+ widget_class->get_preferred_height = gtk_window_get_preferred_height;
+@@ -8294,14 +8292,6 @@ gtk_window_do_popup (GtkWindow *window,
+ 0, gtk_get_current_event_time ());
+ }
+
+-static gboolean
+-gtk_window_popup_menu (GtkWidget *widget)
+-{
+- gtk_window_do_popup (GTK_WINDOW (widget), NULL);
+-
+- return TRUE;
+-}
+-
+ /*********************************
+ * Functions related to resizing *
+ *********************************/
+--
+2.1.0
+
diff --git a/gtk3.spec b/gtk3.spec
index 38594fa..0be6e11 100644
--- a/gtk3.spec
+++ b/gtk3.spec
@@ -17,13 +17,16 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk3
Version: 3.10.9
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
#VCS: git:git://git.gnome.org/gtk+
Source: http://download.gnome.org/sources/gtk+/3.10/gtk+-%{version}.tar.xz
+# Backported from upstream
+Patch0: 0001-Don-t-implement-popup_menu-in-GtkWindow.patch
+
BuildRequires: gnome-common autoconf automake intltool gettext
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: at-spi2-atk-devel
@@ -135,6 +138,7 @@ the functionality of the installed %{name} package.
%prep
%setup -q -n gtk+-%{version}
+%patch0 -p1
%build
@@ -287,6 +291,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache
%{_datadir}/installed-tests
%changelog
+* Mon Aug 25 2014 Kalev Lember <kalevlember at gmail.com> - 3.10.9-2
+- Backport a fix for opening popup menus with the menu key
+
* Thu May 15 2014 Kalev Lember <kalevlember at gmail.com> - 3.10.9-1
- Update to 3.10.9
More information about the scm-commits
mailing list