[gtk+/xi2] GtkIconView: Use GTK+ device grabs.



commit dab34f721dfecf75e1106aed71a277ccad964959
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Mar 9 18:28:50 2010 +0100

    GtkIconView: Use GTK+ device grabs.

 gtk/gtkiconview.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 8e82223..e286cab 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -2394,7 +2394,7 @@ gtk_icon_view_start_rubberbanding (GtkIconView  *icon_view,
   icon_view->priv->doing_rubberband = TRUE;
   icon_view->priv->rubberband_device = device;
 
-  gtk_grab_add (GTK_WIDGET (icon_view));
+  gtk_device_grab_add (GTK_WIDGET (icon_view), device, TRUE);
 }
 
 static void
@@ -2403,11 +2403,12 @@ gtk_icon_view_stop_rubberbanding (GtkIconView *icon_view)
   if (!icon_view->priv->doing_rubberband)
     return;
 
+  gtk_device_grab_remove (GTK_WIDGET (icon_view),
+                          icon_view->priv->rubberband_device);
+
   icon_view->priv->doing_rubberband = FALSE;
   icon_view->priv->rubberband_device = NULL;
 
-  gtk_grab_remove (GTK_WIDGET (icon_view));
-  
   gtk_widget_queue_draw (GTK_WIDGET (icon_view));
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]