From d0d37ed228915f97c589c92ea7ea5915965a5a47 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 31 Jul 2014 11:11:09 -0500 Subject: =?UTF-8?q?Fix=20Xorg=20memory=20leak=20on=20moving=20windows=20Th?= =?UTF-8?q?is=20resolves=20Bug=202078=20Thanks=20to=20Jan=20Jane=C4=8Dek?= =?UTF-8?q?=20for=20significant=20help=20in=20tracking=20this=20down!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kdesktop/lock/main.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'kdesktop') 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 ); } } -- cgit v1.2.1