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 600f8b738..d5ad08e16 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -86,6 +86,10 @@ SOFTWARE.
#include "xichangehierarchy.h" /* For XISendDeviceHierarchyEvent */
#include "syncsrv.h"
+#ifdef _MSC_VER
+#define isfinite(val) _finite(val)
+#endif
+
/** @file
* This file handles input device-related stuff.
*/
@@ -996,6 +1000,10 @@ CloseDownDevices(void)
for (dev = inputInfo.devices; dev; dev = dev->next) {
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);
@@ -1924,7 +1932,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;