Ensure screen is fully hidden before returning from kdestop lock dcop call

pull/2/head
Timothy Pearson 11 years ago
parent da560698f1
commit 6a40ac081b

@ -559,7 +559,7 @@ bool LockProcess::lock()
tqApp->processEvents();
#endif
if (startSaver()) {
if (startSaver(true)) {
// In case of a forced lock we don't react to events during
// the dead-time to give the screensaver some time to activate.
// That way we don't accidentally show the password dialog before
@ -1322,7 +1322,7 @@ void LockProcess::setTransparentBackgroundARGB()
//
// Start the screen saver.
//
bool LockProcess::startSaver()
bool LockProcess::startSaver(bool notify_ready)
{
if (!child_saver && !grabInput())
{
@ -1370,6 +1370,10 @@ bool LockProcess::startSaver()
erase();
}
if (notify_ready) {
saverReady();
}
if (trinity_desktop_lock_in_sec_dlg == FALSE) {
if (trinity_desktop_lock_delay_screensaver_start && trinity_desktop_lock_forced && trinity_desktop_lock_use_system_modal_dialogs) {
ENABLE_CONTINUOUS_LOCKDLG_DISPLAY
@ -2777,6 +2781,11 @@ void LockProcess::fullyOnline() {
}
}
void LockProcess::saverReady() {
DCOPRef ref( "kdesktop", "KScreensaverIface");
ref.send( "saverLockReady" );
}
//===========================================================================
//
// Control pipe handler

@ -139,7 +139,7 @@ private:
bool grabInput();
void ungrabInput();
void cantLock(const TQString &reason);
bool startSaver();
bool startSaver(bool notify_ready = false);
void stopSaver();
bool startHack();
void stopHack();
@ -150,6 +150,7 @@ private:
void unlockXF86();
void showVkbd();
void hideVkbd();
void saverReady();
bool forwardVkbdEvent( XEvent* event );
void sendVkbdFocusInOut( WId window, Time t );
void windowAdded( WId window, bool managed );

@ -454,10 +454,8 @@ int main( int argc, char **argv )
}
bool rt;
bool sig = false;
if( (((!child) && (args->isSet( "forcelock" ))) || (signalled_forcelock == TRUE))) {
rt = process.lock();
sig = true;
}
else if( child || (args->isSet( "dontlock" ) || (signalled_dontlock == TRUE))) {
rt = process.dontLock();
@ -478,12 +476,6 @@ int main( int argc, char **argv )
return 0;
}
if( sig )
{
DCOPRef ref( "kdesktop", "KScreensaverIface");
ref.send( "saverLockReady" );
}
if (in_internal_mode == FALSE) {
trinity_desktop_lock_hidden_window_list.clear();
int ret = app.exec();

Loading…
Cancel
Save