[gnome-text-editor] window: place all windows into their own window group



commit a73618c94780c8234d4406bdd958e37a7939bf66
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 26 16:16:31 2022 -0800

    window: place all windows into their own window group
    
    Otherwise modality will prevent input to the others when dialogs are
    shown such as preferences, about, language selector, etc.

 src/editor-window.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/editor-window.c b/src/editor-window.c
index 4e7205a..026bcdb 100644
--- a/src/editor-window.c
+++ b/src/editor-window.c
@@ -1043,9 +1043,15 @@ editor_window_init (EditorWindow *self)
 EditorWindow *
 _editor_window_new (void)
 {
-  return g_object_new (EDITOR_TYPE_WINDOW,
-                       "application", EDITOR_APPLICATION_DEFAULT,
-                       NULL);
+  g_autoptr(GtkWindowGroup) group = gtk_window_group_new ();
+  EditorWindow *window;
+
+  window = g_object_new (EDITOR_TYPE_WINDOW,
+                         "application", EDITOR_APPLICATION_DEFAULT,
+                         NULL);
+  gtk_window_group_add_window (group, GTK_WINDOW (window));
+
+  return window;
 }
 
 GList *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]