Fix a grab problem with multiple volume buttons

This commit is contained in:
Matthias Clasen 2007-10-04 12:59:57 +00:00
parent d7f0747939
commit 8199b9934e
2 changed files with 48 additions and 1 deletions

View File

@ -16,7 +16,7 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk2 Name: gtk2
Version: %{base_version} Version: %{base_version}
Release: 4%{?dist} Release: 5%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://download.gnome.org/sources/gtk+/2.11/gtk+-%{version}.tar.bz2 Source: http://download.gnome.org/sources/gtk+/2.11/gtk+-%{version}.tar.bz2
@ -35,6 +35,7 @@ Patch3: novalidate.patch
Patch4: libtracker.patch Patch4: libtracker.patch
Patch5: swt-tooltips.patch Patch5: swt-tooltips.patch
Patch6: simple-search-crash.patch Patch6: simple-search-crash.patch
Patch7: scale-button-grab.patch
BuildRequires: atk-devel >= %{atk_version} BuildRequires: atk-devel >= %{atk_version}
BuildRequires: pango-devel >= %{pango_version} BuildRequires: pango-devel >= %{pango_version}
@ -116,6 +117,7 @@ docs for the GTK+ widget toolkit.
%patch4 -p1 -b .libtracker %patch4 -p1 -b .libtracker
%patch5 -p1 -b .swt-tooltips %patch5 -p1 -b .swt-tooltips
%patch6 -p0 -b .simple-search-crash %patch6 -p0 -b .simple-search-crash
%patch7 -p0 -b .scale-button-grab
for i in config.guess config.sub ; do for i in config.guess config.sub ; do
test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i . test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i .
@ -298,6 +300,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/gtk-2.0 %{_datadir}/gtk-2.0
%changelog %changelog
* Thu Oct 4 2007 Matthias Clasen <mclasen@redhat.com> - 2.12.0-5
- Fix a grab problem with multiple volume buttons
* Tue Sep 25 2007 Matthias Clasen <mclasen@redhat.com> - 2.12.0-4 * Tue Sep 25 2007 Matthias Clasen <mclasen@redhat.com> - 2.12.0-4
- Fix a crash in simple search - Fix a crash in simple search
- Drop obsolete Obsoletes and Conflicts - Drop obsolete Obsoletes and Conflicts

42
scale-button-grab.patch Normal file
View File

@ -0,0 +1,42 @@
Index: gtk/gtkscalebutton.c
===================================================================
--- gtk/gtkscalebutton.c (revision 18880)
+++ gtk/gtkscalebutton.c (revision 18881)
@@ -877,6 +877,9 @@
priv = button->priv;
+ if (!GTK_WIDGET_HAS_GRAB (priv->dock))
+ return;
+
if (gtk_widget_is_ancestor (gtk_grab_get_current (), priv->dock))
return;
Index: tests/testvolumebutton.c
===================================================================
--- tests/testvolumebutton.c (revision 18880)
+++ tests/testvolumebutton.c (revision 18881)
@@ -60,15 +60,22 @@
{
GtkWidget *window;
GtkWidget *button;
+ GtkWidget *button2;
+ GtkWidget *box;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
button = gtk_volume_button_new ();
+ button2 = gtk_volume_button_new ();
+ box = gtk_hbox_new (FALSE, 0);
+
g_signal_connect (G_OBJECT (button),
"value-changed",
G_CALLBACK (value_changed), NULL);
- gtk_container_add (GTK_CONTAINER (window), button);
+ gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_container_add (GTK_CONTAINER (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button2);
gtk_widget_show_all (window);
gtk_button_clicked (GTK_BUTTON (button));