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



commit 4e94d087add7b7e779f544ca24ea65d86bbf8932
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Mar 9 18:26:00 2010 +0100

    GtkCellRendererAccel: Use GTK+ device grabs.

 gtk/gtkcellrendereraccel.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c
index 45a14aa..9dfd2c2 100644
--- a/gtk/gtkcellrendereraccel.c
+++ b/gtk/gtkcellrendereraccel.c
@@ -485,7 +485,7 @@ grab_key_callback (GtkWidget            *widget,
   edited = TRUE;
 
  out:
-  gtk_grab_remove (accel->grab_widget);
+  gtk_device_grab_remove (accel->grab_widget, priv->grab_pointer);
   gdk_device_ungrab (priv->grab_keyboard, event->time);
   gdk_device_ungrab (priv->grab_pointer, event->time);
 
@@ -517,7 +517,7 @@ ungrab_stuff (GtkWidget            *widget,
 
   priv = GTK_CELL_RENDERER_ACCEL_GET_PRIVATE (accel);
 
-  gtk_grab_remove (accel->grab_widget);
+  gtk_device_grab_remove (accel->grab_widget, priv->grab_pointer);
   gdk_device_ungrab (priv->grab_keyboard, GDK_CURRENT_TIME);
   gdk_device_ungrab (priv->grab_pointer, GDK_CURRENT_TIME);
 
@@ -658,7 +658,7 @@ gtk_cell_renderer_accel_start_editing (GtkCellRenderer      *cell,
   
   gtk_widget_show_all (accel->edit_widget);
 
-  gtk_grab_add (accel->grab_widget);
+  gtk_device_grab_add (accel->grab_widget, pointer, TRUE);
 
   g_signal_connect (G_OBJECT (accel->edit_widget), "unrealize",
                     G_CALLBACK (ungrab_stuff), accel);



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