diff options
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r-- | xorg-server/dix/devices.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 7c196e077..c8ae230cd 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -87,6 +87,10 @@ SOFTWARE. #include "xserver-properties.h" #include "xichangehierarchy.h" /* For XISendDeviceHierarchyEvent */ +#ifdef _MSC_VER +#define isfinite(val) _finite(val) +#endif + /** @file * This file handles input device-related stuff. */ @@ -994,6 +998,10 @@ CloseDownDevices(void) { if (!IsMaster(dev) && !IsFloating(dev)) dev->master = NULL; + /* Initialise the sprite and paired members of all devices + to avoid crashes in CloseDevice later */ + dev->spriteInfo->sprite=NULL; + dev->spriteInfo->paired=NULL; } CloseDeviceList(&inputInfo.devices); @@ -1836,7 +1844,7 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, vmask &= ~index2; switch (index2) { case KBKeyClickPercent: - t = (INT8)*vlist; + t = *vlist; vlist++; if (t == -1) { t = defaultKeyboardControl.click; |