diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-09-26 20:32:52 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-09-26 20:32:52 +0800 |
commit | 58bf466c8f6c5dd6132164ef3ac002be26b5933c (patch) | |
tree | b49afc2c31679a37ff0ac408bb3a3067167ab28c /embed/mozilla/GtkNSSSecurityWarningDialogs.cpp | |
parent | ca840a52b1caaf2bf47c900bd89825b841f0e0a9 (diff) | |
download | gsoc2013-epiphany-58bf466c8f6c5dd6132164ef3ac002be26b5933c.tar gsoc2013-epiphany-58bf466c8f6c5dd6132164ef3ac002be26b5933c.tar.gz gsoc2013-epiphany-58bf466c8f6c5dd6132164ef3ac002be26b5933c.tar.bz2 gsoc2013-epiphany-58bf466c8f6c5dd6132164ef3ac002be26b5933c.tar.lz gsoc2013-epiphany-58bf466c8f6c5dd6132164ef3ac002be26b5933c.tar.xz gsoc2013-epiphany-58bf466c8f6c5dd6132164ef3ac002be26b5933c.tar.zst gsoc2013-epiphany-58bf466c8f6c5dd6132164ef3ac002be26b5933c.zip |
Push a new event queue while showing the dialogue with gtk_dialog_run.
2005-09-26 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/Makefile.am:
* embed/mozilla/AutoEventQueue.cpp:
* embed/mozilla/AutoEventQueue.h:
* embed/mozilla/GtkNSSSecurityWarningDialogs.cpp: (DoDialog):
Push a new event queue while showing the dialogue
with gtk_dialog_run. This fixes the problem (caused by the
braindead API of showing this dialogue synchronously) that
networking is blocked in all other windows while the dialogue
is shown.
Diffstat (limited to 'embed/mozilla/GtkNSSSecurityWarningDialogs.cpp')
-rw-r--r-- | embed/mozilla/GtkNSSSecurityWarningDialogs.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp b/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp index faec73741..1caa3e415 100644 --- a/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp +++ b/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp @@ -47,6 +47,7 @@ #include "GtkNSSSecurityWarningDialogs.h" #include "EphyUtils.h" +#include "AutoEventQueue.h" #include <nsCOMPtr.h> #include <nsIPrefBranch.h> @@ -200,6 +201,12 @@ GtkNSSSecurityWarningDialogs::DoDialog (nsIInterfaceRequestor *aContext, { *_retval = PR_FALSE; + /* Work around this broken API by pushing a new event queue. Otherwise + * networking will block while the dialogue is shown! + */ + AutoEventQueue queue; + if (NS_FAILED (queue.Init ())) return; + nsresult rv; PRBool show = PR_TRUE; nsCOMPtr<nsIPrefBranch> prefBranch |