|
|
@ -378,7 +378,6 @@ int main( int argc, char **argv )
|
|
|
|
|
|
|
|
|
|
|
|
if (args->isSet( "internal" )) {
|
|
|
|
if (args->isSet( "internal" )) {
|
|
|
|
kdesktop_pid = atoi(args->getOption( "internal" ));
|
|
|
|
kdesktop_pid = atoi(args->getOption( "internal" ));
|
|
|
|
while (signalled_run == FALSE) {
|
|
|
|
|
|
|
|
sigset_t new_mask;
|
|
|
|
sigset_t new_mask;
|
|
|
|
sigset_t orig_mask;
|
|
|
|
sigset_t orig_mask;
|
|
|
|
struct sigaction act;
|
|
|
|
struct sigaction act;
|
|
|
@ -417,13 +416,14 @@ int main( int argc, char **argv )
|
|
|
|
sigaction(SIGTTOU, &act, 0L);
|
|
|
|
sigaction(SIGTTOU, &act, 0L);
|
|
|
|
|
|
|
|
|
|
|
|
// initialize the signal masks
|
|
|
|
// initialize the signal masks
|
|
|
|
sigfillset(&new_mask);
|
|
|
|
sigemptyset(&new_mask);
|
|
|
|
sigdelset(&new_mask,SIGUSR1);
|
|
|
|
sigaddset(&new_mask,SIGUSR1);
|
|
|
|
sigdelset(&new_mask,SIGUSR2);
|
|
|
|
sigaddset(&new_mask,SIGUSR2);
|
|
|
|
sigdelset(&new_mask,SIGWINCH);
|
|
|
|
sigaddset(&new_mask,SIGWINCH);
|
|
|
|
sigdelset(&new_mask,SIGTTIN);
|
|
|
|
sigaddset(&new_mask,SIGTTIN);
|
|
|
|
sigdelset(&new_mask,SIGTTOU);
|
|
|
|
sigaddset(&new_mask,SIGTTOU);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (signalled_run == FALSE) {
|
|
|
|
// let kdesktop know the saver process is ready
|
|
|
|
// let kdesktop know the saver process is ready
|
|
|
|
if (kill(kdesktop_pid, SIGTTIN) < 0) {
|
|
|
|
if (kill(kdesktop_pid, SIGTTIN) < 0) {
|
|
|
|
// The controlling kdesktop process probably died. Commit suicide...
|
|
|
|
// The controlling kdesktop process probably died. Commit suicide...
|
|
|
@ -448,6 +448,9 @@ int main( int argc, char **argv )
|
|
|
|
// Reenable reception of X11 events on the root window
|
|
|
|
// Reenable reception of X11 events on the root window
|
|
|
|
XSelectInput( tqt_xdisplay(), tqt_xrootwin(), rootAttr.your_event_mask );
|
|
|
|
XSelectInput( tqt_xdisplay(), tqt_xrootwin(), rootAttr.your_event_mask );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Block reception of all signals in this thread
|
|
|
|
|
|
|
|
sigprocmask(SIG_BLOCK, &new_mask, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// (re)load settings here so that they actually reflect reality
|
|
|
|
// (re)load settings here so that they actually reflect reality
|
|
|
|