[epiphany/pgriffis/web-extension/blocked-dialog: 10/10] WebExtensions: Workaround add dialog locking up app




commit 45f60ddbd999e1fc0c4629307917c0794c331813
Author: Patrick Griffis <pgriffis igalia com>
Date:   Fri Jun 24 19:26:14 2022 -0500

    WebExtensions: Workaround add dialog locking up app
    
    I don't know why this happens, and is likely a GTK bug, but on my
    system, GNOME X11, having a native dialog over a modal dialog just locks up the UI.
    
    This just changes the extensions dialog to not be modal and the native
    dialog to be.
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1156>

 src/ephy-web-extension-dialog.c | 1 +
 src/window-commands.c           | 1 +
 2 files changed, 2 insertions(+)
---
diff --git a/src/ephy-web-extension-dialog.c b/src/ephy-web-extension-dialog.c
index bf9b22d0b..5d2facf10 100644
--- a/src/ephy-web-extension-dialog.c
+++ b/src/ephy-web-extension-dialog.c
@@ -263,6 +263,7 @@ on_add_button_clicked (GtkButton *button,
                                         GTK_FILE_CHOOSER_ACTION_OPEN,
                                         _("_Open"),
                                         _("_Cancel"));
+  gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (dialog), TRUE);
 
   filter = gtk_file_filter_new ();
   gtk_file_filter_set_name (GTK_FILE_FILTER (filter), "WebExtensions");
diff --git a/src/window-commands.c b/src/window-commands.c
index 01eb6249b..f62a2e856 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2964,5 +2964,6 @@ window_cmd_extensions (GSimpleAction *action,
 
   dialog = ephy_web_extension_dialog_new ();
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window));
+  gtk_window_set_modal (GTK_WINDOW (dialog), FALSE);
   gtk_widget_show_all (dialog);
 }


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