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 <[email protected]> --- 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 74365e1..e3264e6 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; -- 1.7.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
