aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/devices.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-04 07:14:28 +0000
committermarha <marha@users.sourceforge.net>2010-05-04 07:14:28 +0000
commit650d418382eae64ce37765c1fbe2693a6c255ddc (patch)
treea67abd860ca75099f529fd66668f9bb86ace7370 /xorg-server/dix/devices.c
parent567e9524c7a2fdabade9cdbb672a55f6a417ce15 (diff)
downloadvcxsrv-650d418382eae64ce37765c1fbe2693a6c255ddc.tar.gz
vcxsrv-650d418382eae64ce37765c1fbe2693a6c255ddc.tar.bz2
vcxsrv-650d418382eae64ce37765c1fbe2693a6c255ddc.zip
xserver git update 4/5/2010
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;