[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: PATCH: kwallet lockup (#65978/#71048)
From: Lubos Lunak <l.lunak () suse ! cz>
Date: 2004-01-14 12:12:48
Message-ID: 200401141312.48353.l.lunak () suse ! cz
[Download RAW message or body]
On Tuesday 13 of January 2004 10:55, Lubos Lunak wrote:
> On Monday 12 of January 2004 18:17, Dirk Mueller wrote:
> > On Monday 12 January 2004 18:08, Lubos Lunak wrote:
[snip]
> > seems like khtml has to be converted to use the asynchronous api,
> > something
>
> Not only khtml, but everything that can create a popup, otherwise the
> kwallet<->popup deadlock can occur.
>
> > which I wanted to avoid since while it might close this problem, it will
> > open an extremely huge can of worms inside khtml. I'm really not very
> > confident in changing something like this in this phase of the release
> > cycle.
>
> I think making the kwallet call blocking and closing all popups before it
> is a sufficient solution for 3.2. Ok, not updating the GUI may be
> significant, but the world will not tumble down. All other solutions I see
> are either worse, or need to be post-3.2 (be it making TT create some
> proper
> qApp->eventLoop()->processEvent( OnlyUpdateGUI ) or whatever).
Please review the attached patch. It reverts back to r1.42 (blocking DCOP
call), and closes all open popups in the application before the call.
--
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
["kwallet.cc.patch" (text/x-diff)]
--- kwallet.cc.sav 2004-01-13 14:39:08.000000000 +0100
+++ kwallet.cc 2004-01-14 13:08:59.000000000 +0100
@@ -24,6 +24,8 @@
#include <kdeversion.h>
#include <dcopclient.h>
#include <dcopref.h>
+#include <qpopupmenu.h>
+#include <qapplication.h>
#include <assert.h>
@@ -165,22 +167,19 @@ Wallet *Wallet::openWallet(const QString
return wallet;
}
+ // avoid deadlock if the app has some popup open (#65978/#71048)
+ while( QWidget* widget = qApp->activePopupWidget())
+ widget->close();
+
bool isPath = ot == Path;
DCOPReply r;
-#if KDE_IS_VERSION(3,1,90)
- if (isPath) {
- r = DCOPRef("kded", "kwalletd").callExt("openPath", DCOPRef::UseEventLoop, -1, name, uint(w));
- } else {
- r = DCOPRef("kded", "kwalletd").callExt("open", DCOPRef::UseEventLoop, -1, name, uint(w));
- }
-#else
if (isPath) {
r = DCOPRef("kded", "kwalletd").call("openPath", name, uint(w));
} else {
r = DCOPRef("kded", "kwalletd").call("open", name, uint(w));
}
-#endif
+
if (r.isValid()) {
int drc = -1;
r.get(drc);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic