From d8e48deb212767c4dfce982e6cb9d1b1fce63b96 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 25 Aug 2009 22:29:25 -0700 Subject: 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 Signed-off-by: Keith Packard --- Xext/xtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- cgit v1.2.3