window: add each instance to each own group

Prevents the About dialog from blocking interactions on all windows.

https://bugzilla.gnome.org/show_bug.cgi?id=781053
This commit is contained in:
Dimitrios Christidis
2017-04-08 14:33:31 +02:00
committed by Christian Hergert
parent be65d01385
commit 987f66197f

View File

@ -841,6 +841,7 @@ sp_window_init (SpWindow *self)
{ "screenshot", sp_window_screenshot },
};
SpSelection *selection;
g_autoptr(GtkWindowGroup) window_group = NULL;
gtk_widget_init_template (GTK_WIDGET (self));
@ -901,6 +902,12 @@ sp_window_init (SpWindow *self)
* launch, enter, escape, view.
*/
gtk_window_set_focus (GTK_WINDOW (self), GTK_WIDGET (self->record_button));
/*
* Prevent grabs (e.g. modal dialogs) from affecting multiple windows.
*/
window_group = gtk_window_group_new ();
gtk_window_group_add_window (window_group, GTK_WINDOW (self));
}
static void