From: Daniel Boles Date: Sun, 27 Aug 2017 20:29:52 +0000 (+0100) Subject: ComboBox: List-mode popup must open on CB’s screen X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~290 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=70534de382c827f690f1673a0b6710eff5dcfdf5;p=gtk%2B3.0.git ComboBox: List-mode popup must open on CB’s screen The screen for the list-mode popup_window was only being set in set_popup_widget(), i.e. when changing modes, so if the ComboBox was moved to a different screen later, the popup would appear on the original one, which is wrong. Worse, this (somehow) broke opening some combos in the Inspector. Fix this by moving the call to set_screen() to popup_for_device(), so the popup_window is put on the correct screen each time around. https://bugzilla.gnome.org/show_bug.cgi?id=468868 https://bugzilla.gnome.org/show_bug.cgi?id=786771 --- diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 1bac65977a..743aa49408 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1880,8 +1880,6 @@ gtk_combo_box_set_popup_widget (GtkComboBox *combo_box, } gtk_window_set_resizable (GTK_WINDOW (priv->popup_window), FALSE); - gtk_window_set_screen (GTK_WINDOW (priv->popup_window), - gtk_widget_get_screen (GTK_WIDGET (combo_box))); priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL); @@ -2359,6 +2357,8 @@ gtk_combo_box_popup_for_device (GtkComboBox *combo_box, TRUE); /* popup */ + gtk_window_set_screen (GTK_WINDOW (priv->popup_window), + gtk_widget_get_screen (GTK_WIDGET (combo_box))); gtk_widget_show (priv->popup_window); if (path)