mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-02 03:00:35 +01:00
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>
(cherry picked from commit 18413f5508)
This commit is contained in:
parent
aef58ce5ba
commit
ee23ecc22e
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue