gtk2/scale-button-grab.patch
2007-10-04 12:59:57 +00:00

43 lines
1.2 KiB
Diff

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