From: Daniel Boles Date: Mon, 28 Aug 2017 17:38:45 +0000 (+0100) Subject: Revert "combobox: remove superfluous GTK+ grabs" X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~288 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=13017239055dc492f7e5cdeae63f01e6e820da4e;p=gtk%2B3.0.git Revert "combobox: remove superfluous GTK+ grabs" This reverts commit 46b4e5d38877197503f802380e5c9a469218f99b. Apparently these weren’t so redundant, because their removal introduced at least 2 bugs in list-mode ComboBoxes: failure to close the popup upon clicking out of it, and failing to receive mouse input in the popup of a CB in a modal window. It may also have caused (even more!) stuck grabs. https://bugzilla.gnome.org/show_bug.cgi?id=738387 https://bugzilla.gnome.org/show_bug.cgi?id=776793 --- diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index fa1e26c238..ede2fba625 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -2374,6 +2374,7 @@ gtk_combo_box_popup_for_device (GtkComboBox *combo_box, return; } + gtk_device_grab_add (priv->popup_window, pointer, TRUE); priv->grab_pointer = pointer; g_signal_connect (priv->popup_window, @@ -2448,6 +2449,7 @@ gtk_combo_box_popdown (GtkComboBox *combo_box) if (priv->grab_pointer) gdk_seat_ungrab (gdk_device_get_seat (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);