summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-04-08 15:13:08 -0500
committerSlávek Banko <slavek.banko@axis.cz>2015-04-14 02:27:23 +0200
commitd9fe0f0bf3ffa245e094e9d86da3b92a33d27bb9 (patch)
tree20979d92829808e36d5ff17557a301a8f2486da7 /kdesktop/lock
parent15e069f3e078dd97e7cc99a66b77b2647a82c53d (diff)
downloadtdebase-d9fe0f0bf3ffa245e094e9d86da3b92a33d27bb9.tar.gz
tdebase-d9fe0f0bf3ffa245e094e9d86da3b92a33d27bb9.zip
Remove external dcop call and associated thread
Fix lockup on lock screen command due to signal race condition (cherry picked from commit e80c2baea0319decdad80c3c98cc7b28a010b0f0)
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/lockprocess.cc4
-rw-r--r--kdesktop/lock/main.cc7
2 files changed, 8 insertions, 3 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index 9612f5cca..4e3922a68 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -981,8 +981,6 @@ void LockProcess::createSaverWindow()
}
}
- fullyOnline();
-
kdDebug(1204) << "Saver window Id: " << winId() << endl;
}
@@ -1319,6 +1317,7 @@ void LockProcess::saverReadyIfNeeded()
// Make sure the desktop is hidden before notifying the desktop that the saver is running
m_notifyReadyRequested = false;
saverReady();
+ fullyOnline();
}
}
@@ -1405,6 +1404,7 @@ bool LockProcess::startSaver(bool notify_ready)
}
}
}
+
return true;
}
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index 79799d129..bafa02539 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -380,6 +380,7 @@ int main( int argc, char **argv )
kdesktop_pid = atoi(args->getOption( "internal" ));
while (signalled_run == FALSE) {
sigset_t new_mask;
+ sigset_t orig_mask;
struct sigaction act;
in_internal_mode = TRUE;
@@ -438,7 +439,11 @@ int main( int argc, char **argv )
app->processEvents();
// wait for SIGUSR1, SIGUSR2, SIGWINCH, SIGTTIN, or SIGTTOU
- sigsuspend(&new_mask);
+ sigprocmask(SIG_BLOCK, &new_mask, &orig_mask);
+ if (signalled_run != TRUE) {
+ sigsuspend(&orig_mask);
+ }
+ sigprocmask(SIG_UNBLOCK, &new_mask, NULL);
// Reenable reception of X11 events on the root window
XSelectInput( tqt_xdisplay(), tqt_xrootwin(), rootAttr.your_event_mask );