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
This commit is contained in:
Daniel Boles 2017-10-04 12:16:52 +01:00
parent fa4d814462
commit b9989e554b

View File

@ -2439,9 +2439,11 @@ gtk_combo_box_popdown (GtkComboBox *combo_box)
return; return;
if (priv->grab_pointer) 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_widget_hide (priv->popup_window);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button), gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button),
FALSE); FALSE);