summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/main.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-01-08 03:21:58 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-01-08 03:21:58 -0600
commit51a20070fd51c4ce4eca550fd458b7223bee662a (patch)
tree678874c0e963ba24982639bcdbb289c167badf87 /kdesktop/lock/main.cc
parente990ea9964a738dd0714874a2c42ff874aae7495 (diff)
downloadtdebase-51a20070fd51c4ce4eca550fd458b7223bee662a.tar.gz
tdebase-51a20070fd51c4ce4eca550fd458b7223bee662a.zip
Fix screen sometimes not being hidden on power management action or desktop switch
Handle kdesktop_lock termination in a more sane manner by simply relaunching it if possible
Diffstat (limited to 'kdesktop/lock/main.cc')
-rw-r--r--kdesktop/lock/main.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index ba42318c0..43534c255 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -416,6 +416,12 @@ int main( int argc, char **argv )
sigdelset(&new_mask,SIGTTIN);
sigdelset(&new_mask,SIGTTOU);
+ // let kdesktop know the saver process is ready
+ if (kill(kdesktop_pid, SIGTTIN) < 0) {
+ // The controlling kdesktop process probably died. Commit suicide...
+ return 12;
+ }
+
// wait for SIGUSR1, SIGUSR2, SIGWINCH, SIGTTIN, or SIGTTOU
sigsuspend(&new_mask);
}