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



commit 86bda5a9b58a8ba31f902a829cd89afb0cea1f96
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Mar 9 18:27:19 2010 +0100

    GtkEntryCompletion: Use GTK+ device grabs.

 gtk/gtkentrycompletion.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index e4f4a44..a76cf56 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1520,7 +1520,7 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion,
 
   gtk_widget_show (completion->priv->popup_window);
 
-  gtk_grab_add (completion->priv->popup_window);
+  gtk_device_grab_add (completion->priv->popup_window, device, TRUE);
   gdk_device_grab (device, completion->priv->popup_window->window,
                    GDK_OWNERSHIP_WINDOW, TRUE,
                    GDK_BUTTON_PRESS_MASK |
@@ -1542,7 +1542,8 @@ _gtk_entry_completion_popdown (GtkEntryCompletion *completion)
   if (completion->priv->grab_device)
     {
       gdk_device_ungrab (completion->priv->grab_device, GDK_CURRENT_TIME);
-      gtk_grab_remove (completion->priv->popup_window);
+      gtk_device_grab_remove (completion->priv->popup_window,
+                              completion->priv->grab_device);
       completion->priv->grab_device = NULL;
     }
 



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