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();
|
||||
|
||||
LeaveWindow(dev);
|
||||
SetFocusOut(dev);
|
||||
|
||||
*prev = dev->next;
|
||||
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.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
LeaveWindow(DeviceIntPtr dev)
|
||||
{
|
||||
PointerWindows[dev->id] = NULL;
|
||||
|
|
|
@ -76,6 +76,7 @@ extern void EnterWindow(DeviceIntPtr dev,
|
|||
WindowPtr win,
|
||||
int mode);
|
||||
|
||||
extern void LeaveWindow(DeviceIntPtr dev);
|
||||
|
||||
extern void CoreFocusEvent(DeviceIntPtr kbd,
|
||||
int type,
|
||||
|
|
Loading…
Reference in New Issue
Block a user