[geary/mjog/1125-file-choosers-app-wide-modal] client: Ensure modal dialogs only block their associated main window




commit 2de1e19a14bb346dc638a6da2b34f59df12382ac
Author: Michael Gratton <mike vee net>
Date:   Wed Jan 20 20:08:34 2021 +1100

    client: Ensure modal dialogs only block their associated main window
    
    Create new window groups for each main window and composer window, so
    modal dialogs (about, file choosers, etc) don't block other windows.
    
    Same as #932 but for all windows.
    
    Fixes #1125

 src/client/application/application-main-window.vala | 6 ++++++
 src/client/composer/composer-window.vala            | 5 +++++
 2 files changed, 11 insertions(+)
---
diff --git a/src/client/application/application-main-window.vala 
b/src/client/application/application-main-window.vala
index d0f0ae21b..955a8fa78 100644
--- a/src/client/application/application-main-window.vala
+++ b/src/client/application/application-main-window.vala
@@ -517,6 +517,12 @@ public class Application.MainWindow :
         // without a warning.
         this.controller = application.controller;
 
+        // Create a new group for the window so attachment file
+        // choosers (save attachments & composer attach files) do not
+        // block other main windows or composers.
+        var group = new Gtk.WindowGroup();
+        group.add_window(this);
+
         load_config(application.config);
         restore_saved_window_state();
 
diff --git a/src/client/composer/composer-window.vala b/src/client/composer/composer-window.vala
index f7d4fd78c..f674c8c5e 100644
--- a/src/client/composer/composer-window.vala
+++ b/src/client/composer/composer-window.vala
@@ -35,6 +35,11 @@ public class Composer.Window : Gtk.ApplicationWindow, Container {
         this.composer = composer;
         this.composer.set_mode(DETACHED);
 
+        // Create a new group for the window so attachment file
+        // choosers do not block other main windows or composers.
+        var group = new Gtk.WindowGroup();
+        group.add_window(this);
+
         // XXX Bug 764622
         set_property("name", "GearyComposerWindow");
 


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