aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/devices.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
committermarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
commit0874ae23a16946781dd517cfdb011c691ad0b581 (patch)
tree8de31864935e96a5e59b9fe6ceb12390bbc474cd /xorg-server/dix/devices.c
parentd059ebdcb012228102f0b64f8cddf9464d5b625a (diff)
downloadvcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.gz
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.bz2
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.zip
svn merge -r571:HEAD "^/branches/released" .
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r--xorg-server/dix/devices.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 6119dcebb..a33df4d0a 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -89,13 +89,6 @@ SOFTWARE.
* This file handles input device-related stuff.
*/
-static int CoreDevicePrivateKeyIndex;
-DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKeyIndex;
-/* Used to store classes currently not in use by an MD */
-static int UnusedClassesPrivateKeyIndex;
-DevPrivateKey UnusedClassesPrivateKey = &UnusedClassesPrivateKeyIndex;
-
-
static void RecalculateMasterButtons(DeviceIntPtr slave);
/**
@@ -852,11 +845,14 @@ CloseDevice(DeviceIntPtr dev)
if (IsMaster(dev))
{
- classes = dixLookupPrivate(&dev->devPrivates, UnusedClassesPrivateKey);
+ classes = dev->unused_classes;
FreeAllDeviceClasses(classes);
+ xfree(classes);
}
if (DevHasCursor(dev) && dev->spriteInfo->sprite) {
+ if (dev->spriteInfo->sprite->current)
+ FreeCursor(dev->spriteInfo->sprite->current, None);
xfree(dev->spriteInfo->sprite->spriteTrace);
xfree(dev->spriteInfo->sprite);
}
@@ -2465,7 +2461,6 @@ AllocDevicePair (ClientPtr client, char* name,
{
DeviceIntPtr pointer;
DeviceIntPtr keyboard;
- ClassesPtr classes;
*ptr = *keybd = NULL;
pointer = AddInputDevice(client, ptr_proc, TRUE);
@@ -2511,12 +2506,9 @@ AllocDevicePair (ClientPtr client, char* name,
keyboard->last.slave = NULL;
keyboard->type = (master) ? MASTER_KEYBOARD : SLAVE;
-
/* The ClassesRec stores the device classes currently not used. */
- classes = xcalloc(1, sizeof(ClassesRec));
- dixSetPrivate(&pointer->devPrivates, UnusedClassesPrivateKey, classes);
- classes = xcalloc(1, sizeof(ClassesRec));
- dixSetPrivate(&keyboard->devPrivates, UnusedClassesPrivateKey, classes);
+ pointer->unused_classes = xcalloc(1, sizeof(ClassesRec));
+ keyboard->unused_classes = xcalloc(1, sizeof(ClassesRec));
*ptr = pointer;
*keybd = keyboard;