dix: call SetFocusOut and LeaveWindow when disabling a device.
PointerWindows[x] would be set after removing a master pointer. Destroying this window then crashed the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
97ed946cfc
commit
d3e5629fac
|
@ -448,6 +448,8 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
|
||||||
}
|
}
|
||||||
OsReleaseSignals();
|
OsReleaseSignals();
|
||||||
|
|
||||||
|
LeaveWindow(dev);
|
||||||
|
SetFocusOut(dev);
|
||||||
|
|
||||||
*prev = dev->next;
|
*prev = dev->next;
|
||||||
dev->next = inputInfo.off_devices;
|
dev->next = inputInfo.off_devices;
|
||||||
|
|
|
@ -166,7 +166,7 @@ EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode)
|
||||||
/**
|
/**
|
||||||
* Unset the presence flag for dev to mark that it is not in 'win' anymore.
|
* Unset the presence flag for dev to mark that it is not in 'win' anymore.
|
||||||
*/
|
*/
|
||||||
static void
|
void
|
||||||
LeaveWindow(DeviceIntPtr dev)
|
LeaveWindow(DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
PointerWindows[dev->id] = NULL;
|
PointerWindows[dev->id] = NULL;
|
||||||
|
|
|
@ -76,6 +76,7 @@ extern void EnterWindow(DeviceIntPtr dev,
|
||||||
WindowPtr win,
|
WindowPtr win,
|
||||||
int mode);
|
int mode);
|
||||||
|
|
||||||
|
extern void LeaveWindow(DeviceIntPtr dev);
|
||||||
|
|
||||||
extern void CoreFocusEvent(DeviceIntPtr kbd,
|
extern void CoreFocusEvent(DeviceIntPtr kbd,
|
||||||
int type,
|
int type,
|
||||||
|
|
Loading…
Reference in New Issue