aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r--xorg-server/dix/devices.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 7478ad67a..f01857e77 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -88,6 +88,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.
*/
@@ -1022,6 +1026,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);
@@ -1931,7 +1939,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;