summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-08-25 22:29:25 -0700
committerKeith Packard <keithp@keithp.com>2009-08-25 22:29:25 -0700
commitd8e48deb212767c4dfce982e6cb9d1b1fce63b96 (patch)
treebdbb974bdf2b03a17116f804da0506e146b5bfac
parent76a1839b0a7dcb82e46c43533d252288677c6dbb (diff)
Block signals while delivering XTest events (fixes bug 23100)
XTest uses the same event list as all input devices, and input devices use it at SIGIO time. This causes mass confusion when a SIGIO event occurs in the middle of XTest event processing. The master branch has a much different fix, using a separate input queue which reduces latency that may be caused by XTest event queuing; it's a 'nicer' fix in some ways, but this simple fix should solve the problem. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--Xext/xtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 9cfe8ca17..e5ab7b451 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -384,6 +384,7 @@ ProcXTestFakeInput(client)
if (screenIsSaved == SCREEN_SAVER_ON)
dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
+ OsBlockSignals();
GetEventList(&events);
switch(type) {
case MotionNotify:
@@ -402,7 +403,6 @@ ProcXTestFakeInput(client)
break;
}
- OsBlockSignals();
for (i = 0; i < nevents; i++)
mieqEnqueue(dev, (events+i)->event);
OsReleaseSignals();