Version: (using KDE KDE 3.3.0) Installed from: Debian testing/unstable Packages OS: Linux How to reproduce this: 1. Press Alt+F2 to open the Execute Command dialog. 2. Enter a website for which you need HTTP authorization. 3. Now two windows open: one is the authorization dialog itself, the other one is a progress bar for the website. 4. In about every second case the progress window gets the input focus and when I begin to type in my user/password data nothing happens (no surprise). Seems like the window that pops up last gets the focus. I think the correct handling should be that always the authorization gets the focus. I don't know whether it is possible to fix this but it sure is an irritating behaviour. Oh, and I have focus-follows-click (not mouse-move), so this can't be the reason.
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;