gtkrange: Instaurate GTK+ grabs while manipulating ranges
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 26 Jun 2017 17:26:26 +0000 (19:26 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 26 Jul 2017 10:53:33 +0000 (12:53 +0200)
It should not be necessary for most situations, except while there's
GDK grabs coercing events in a different way.

https://bugzilla.gnome.org/show_bug.cgi?id=782870

gtk/gtkrange.c

index a7497a42d27b82e4cc05155f10b0cef83f5bc0b6..98ec13bc3aefe58012253fb6ff7d26352dccecfb 100644 (file)
@@ -2426,6 +2426,8 @@ range_grab_add (GtkRange      *range,
   update_steppers_state (range);
 
   gtk_style_context_add_class (context, "dragging");
+
+  gtk_grab_add (GTK_WIDGET (range));
 }
 
 static void
@@ -2453,6 +2455,7 @@ range_grab_remove (GtkRange *range)
   if (!priv->grab_location)
     return;
 
+  gtk_grab_remove (GTK_WIDGET (range));
   context = gtk_widget_get_style_context (GTK_WIDGET (range));
 
   gtk_css_gadget_queue_allocate (priv->grab_location);