summaryrefslogtreecommitdiffstats
path: root/kicker/kicker/ui/k_mnu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kicker/kicker/ui/k_mnu.cpp')
-rw-r--r--kicker/kicker/ui/k_mnu.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/kicker/kicker/ui/k_mnu.cpp b/kicker/kicker/ui/k_mnu.cpp
index 8ab0d3a0f..e7a7a0fb0 100644
--- a/kicker/kicker/ui/k_mnu.cpp
+++ b/kicker/kicker/ui/k_mnu.cpp
@@ -448,9 +448,14 @@ extern int kicker_screen_number;
void PanelKMenu::slotLock()
{
TQCString appname( "kdesktop" );
- if ( kicker_screen_number )
+ if ( kicker_screen_number ) {
appname.sprintf("kdesktop-screen-%d", kicker_screen_number);
- kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", TQString(""));
+ }
+ TQCString replyType;
+ TQByteArray replyData;
+ // Block here until lock is complete
+ // If this is not done the desktop of the locked session will be shown after VT switch until the lock fully engages!
+ kapp->dcopClient()->call(appname, "KScreensaverIface", "lock()", TQCString(""), replyType, replyData);
}
void PanelKMenu::slotLogout()
@@ -520,8 +525,9 @@ void PanelKMenu::doNewSession( bool lock )
if (result==KMessageBox::Cancel)
return;
- if (lock)
+ if (lock) {
slotLock();
+ }
DM().startReserve();
}