From 51a20070fd51c4ce4eca550fd458b7223bee662a Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 8 Jan 2014 03:21:58 -0600 Subject: 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 --- kdesktop/lock/main.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'kdesktop/lock/main.cc') 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); } -- cgit v1.2.1