From 42c5401145434f3c2d73e224e35ef3f0826229f0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 12 Oct 2011 08:22:45 +0000 Subject: Fix desktop lock not releasing to allow password authentication if an X11 display switch keypress was detected in certain situations git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1258629 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdesktop/lock/lockprocess.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'kdesktop/lock') diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index e85ed0dbb..827ea6b21 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -1668,13 +1668,16 @@ void LockProcess::cleanupPopup() void LockProcess::doFunctionKeyBroadcast() { // Provide a clean, pretty display switch by hiding the password dialog here - mBusy=true; - TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed())); - if (mkeyCode == XKeysymToKeycode(qt_xdisplay(), XF86XK_Display)) { - while (mDialogControlLock == true) sleep(1); - mDialogControlLock = true; - closeCurrentWindow(); - mDialogControlLock = false; + // This does NOT work with the SAK or system modal dialogs! + if ((!trinity_desktop_lock_use_system_modal_dialogs) && (!trinity_desktop_lock_use_sak)) { + mBusy=true; + TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed())); + if (mkeyCode == XKeysymToKeycode(qt_xdisplay(), XF86XK_Display)) { + while (mDialogControlLock == true) sleep(1); + mDialogControlLock = true; + currentDialog->close(); // DO NOT use closeCurrentWindow() here! + mDialogControlLock = false; + } } setCursor( tqblankCursor ); -- cgit v1.2.1