[gtk+/gtk-3-22] ComboBox: Don’t try to remove grab on NULL device



commit b9989e554b3ccd122b1726f2b7d128638c3b5ca4
Author: Daniel Boles <dboles src gnome org>
Date:   Wed Oct 4 12:16:52 2017 +0100

    ComboBox: Don’t try to remove grab on NULL device
    
    gtk_device_grab_remove() quite rightly expects a non-NULL GdkDevice, and
    we already have a branch ensuring that, into which we can move this call

 gtk/gtkcombobox.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index b2fb66f..0881324 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2439,9 +2439,11 @@ gtk_combo_box_popdown (GtkComboBox *combo_box)
     return;
 
   if (priv->grab_pointer)
-    gdk_seat_ungrab (gdk_device_get_seat (priv->grab_pointer));
+    {
+      gdk_seat_ungrab (gdk_device_get_seat (priv->grab_pointer));
+      gtk_device_grab_remove (priv->popup_window, priv->grab_pointer);
+    }
 
-  gtk_device_grab_remove (priv->popup_window, priv->grab_pointer);
   gtk_widget_hide (priv->popup_window);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button),
                                 FALSE);


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