diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-30 16:36:56 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-03 10:11:48 +1000 |
commit | d3e5629fac224d53a972df5e2a87db02534f9b17 (patch) | |
tree | 2d7215ae08a23b0c0867a6c0269aa2a97bb655e8 /dix | |
parent | 97ed946cfccec5979c47b5fabf1ad56cc7d33ef4 (diff) |
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>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/devices.c | 2 | ||||
-rw-r--r-- | dix/enterleave.c | 2 | ||||
-rw-r--r-- | dix/enterleave.h | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/dix/devices.c b/dix/devices.c index 32fd4451a..53b7e2ccd 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -448,6 +448,8 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent) } OsReleaseSignals(); + LeaveWindow(dev); + SetFocusOut(dev); *prev = dev->next; dev->next = inputInfo.off_devices; diff --git a/dix/enterleave.c b/dix/enterleave.c index 29b93499c..c08cc3100 100644 --- a/dix/enterleave.c +++ b/dix/enterleave.c @@ -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; diff --git a/dix/enterleave.h b/dix/enterleave.h index 4da4e02fb..471f4efaa 100644 --- a/dix/enterleave.h +++ b/dix/enterleave.h @@ -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, |