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 ab8a648a9..b6f7ea697 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.
*/
@@ -991,6 +995,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);
@@ -1824,7 +1832,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;