diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-03-03 14:15:55 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-03-09 07:59:35 +1000 |
commit | 18413f55089623123537c1499b02aa95ca2014d2 (patch) | |
tree | 80517f2cee0f3cdba953b324c642a3db7a543bcf /hw/xfree86 | |
parent | 1c008e7e7865b405b8033f625333cd64ece4499e (diff) |
xfree86: block signals between EnableDevice and first CheckMotion()
Devices usually enable SIGIO processing in EnableDevice. CheckMotion
initialises the pointer sprite, sends Enter/Leave events, etc. This leaves
us with a small window where events may be processed without the sprite or
pointer position (as seen from the protocol) is valid.
Block signals during this window.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'hw/xfree86')
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 74365e10b..e3264e6a9 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -817,15 +817,18 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) /* Enable it if it's properly initialised and we're currently in the VT */ if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema) { + OsBlockSignals(); EnableDevice(dev, TRUE); if (!dev->enabled) { + OsReleaseSignals(); xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", pInfo->name); rval = BadMatch; goto unwind; } /* send enter/leave event, update sprite window */ CheckMotion(NULL, dev); + OsReleaseSignals(); } *pdev = dev; |