Summary: | Authorization dialog focus handling broken when opening a protected website through Alt+F2 | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Martin Piskernig <martin.piskernig> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | faure, joerg, Marcin.Kasperski, missive |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Martin Piskernig
2004-09-21 14:07:23 UTC
This bug still happens with: Qt: 3.3.4 KDE: 3.3.2 Qt: 3.3.4 KDE: 3.4.0 Lubos: is this a matter of parent window IDs (note that this is cross-process)? or some window flags? (should kpasswdserver.cpp use KeepAbove like kwalletd.cpp does?) This will need some work. *** Bug 100817 has been marked as a duplicate of this bug. *** *** Bug 104670 has been marked as a duplicate of this bug. *** *** Bug 101850 has been marked as a duplicate of this bug. *** NOTE TO SELF: Check all duplicates. Hmm, is seems to me that bug 104670 I reported is not exactly the same as this one (although maybe there is the same background for both of them). Window relationship should be now fixed, so part of this problem should be fixed. The only remaining thing is the fact that the progress window steals focus from the dialog. Note that this behavior also occurs when an authorization dialog is opened from knetattach (Network Folders Applet)... or seemingly anytime KDE triggers an authentication and a progress dialog. I couldn't even fix the issue by setting forcing focus and setting the focus stealing prevention level of the authorization dialog. SVN commit 596498 by dfaure: Hide the progress dialog while displaying the password dialog BUG: 89951 M +1 -0 job.cpp M +15 -3 slavebase.cpp --- branches/KDE/3.5/kdelibs/kio/kio/job.cpp #596497:596498 @@ -110,6 +110,7 @@ if ( showProgressInfo ) { m_progressId = Observer::self()->newJob( this, true ); + addMetaData("progress-id", QString::number(m_progressId)); //kdDebug(7007) << "Created job " << this << " with progress info -- m_progressId=" << m_progressId << endl; // Connect global progress info signals connect( this, SIGNAL( percent( KIO::Job*, unsigned long ) ), --- branches/KDE/3.5/kdelibs/kio/kio/slavebase.cpp #596497:596498 @@ -58,6 +58,8 @@ #include "kio/ioslave_defaults.h" #include "kio/slaveinterface.h" +#include "uiserver_stub.h" + #ifndef NDEBUG #ifdef HAVE_BACKTRACE #include <execinfo.h> @@ -821,11 +823,16 @@ QByteArray reply; AuthInfo authResult; long windowId = metaData("window-id").toLong(); + long progressId = metaData("progress-id").toLong(); - kdDebug(7019) << "SlaveBase::openPassDlg window-id=" << windowId << endl; + kdDebug(7019) << "SlaveBase::openPassDlg window-id=" << windowId << " progress-id=" << progressId << endl; (void) dcopClient(); // Make sure to have a dcop client. + UIServer_stub uiserver( "kio_uiserver", "UIServer" ); + if (progressId) + uiserver.setJobVisible( progressId, false ); + QDataStream stream(params, IO_WriteOnly); if (metaData("no-auth-prompt").lower() == "true") @@ -833,8 +840,13 @@ else stream << info << errorMsg << windowId << s_seqNr; - if (!d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo, QString, long int, long int)", - params, replyType, reply ) ) + bool callOK = d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo, QString, long int, long int)", + params, replyType, reply ); + + if (progressId) + uiserver.setJobVisible( progressId, true ); + + if (!callOK) { kdWarning(7019) << "Can't communicate with kded_kpasswdserver!" << endl; return false; |