diff options
Diffstat (limited to 'kdesktop/lock/lockprocess.cc')
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index e7b05d73c..33fd374aa 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -173,6 +173,7 @@ extern bool trinity_desktop_lock_hide_active_windows; extern bool trinity_desktop_lock_forced; extern bool argb_visual; +extern pid_t kdesktop_pid; extern TQXLibWindowList trinity_desktop_lock_hidden_window_list; @@ -224,6 +225,7 @@ LockProcess::LockProcess() mHackStartupEnabled(true), mOverrideHackStartupEnabled(false), mResizingDesktopLock(false), + mFullyOnlineSent(false), m_rootPixmap(NULL), mBackingStartupDelayTimer(0), m_startupStatusDialog(NULL), @@ -973,6 +975,8 @@ void LockProcess::createSaverWindow() } } + fullyOnline(); + kdDebug(1204) << "Saver window Id: " << winId() << endl; } @@ -2739,6 +2743,21 @@ void LockProcess::processInputPipeCommand(TQString inputcommand) { } } +void LockProcess::fullyOnline() { + if (!mFullyOnlineSent) { + if (kdesktop_pid > 0) { + if (kill(kdesktop_pid, SIGUSR2) < 0) { + // The controlling kdesktop process probably died. Commit suicide... + // Exit uncleanly + exit(1); + } + else { + mFullyOnlineSent = true; + } + } + } +} + //=========================================================================== // // Control pipe handler |