summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kdesktop/lock/main.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index 2a8a6657d..d5f037f56 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -422,8 +422,19 @@ int main( int argc, char **argv )
return 12;
}
+ // Get root window attributes
+ XWindowAttributes rootAttr;
+ XGetWindowAttributes(tqt_xdisplay(), RootWindow(tqt_xdisplay(), tqt_xscreen()), &rootAttr);
+
+ // Disable reception of all X11 events on the root window
+ XSelectInput( tqt_xdisplay(), tqt_xrootwin(), 0 );
+ app.processEvents();
+
// wait for SIGUSR1, SIGUSR2, SIGWINCH, SIGTTIN, or SIGTTOU
sigsuspend(&new_mask);
+
+ // Reenable reception of X11 events on the root window
+ XSelectInput( tqt_xdisplay(), tqt_xrootwin(), rootAttr.your_event_mask );
}
}