fontbutton: Make sure the window is on the same display
authorBenjamin Otte <otte@redhat.com>
Mon, 23 Aug 2021 03:55:32 +0000 (05:55 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 2 Sep 2021 23:59:41 +0000 (19:59 -0400)
We don't want the font buttons created by the inspector to run on the
default display.

gtk/gtkfontbutton.c

index a207c5a4031cdec14cd37975ee1a78d7355045f6..aad99d186b849458964a97b4e338847c83aa0fd1 100644 (file)
@@ -968,6 +968,7 @@ gtk_font_button_clicked (GtkButton *button,
       font_button->font_dialog = gtk_font_chooser_dialog_new (font_button->title, NULL);
       gtk_window_set_hide_on_close (GTK_WINDOW (font_button->font_dialog), TRUE);
       gtk_window_set_modal (GTK_WINDOW (font_button->font_dialog), font_button->modal);
+      gtk_window_set_display (GTK_WINDOW (font_button->font_dialog), gtk_widget_get_display (GTK_WIDGET (button)));
 
       font_dialog = GTK_FONT_CHOOSER (font_button->font_dialog);