aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/devices.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-15 21:23:25 +0100
committermarha <marha@users.sourceforge.net>2014-01-15 21:23:25 +0100
commit1b0fcca503ae9cf2d462b60770f96c794dfbb27a (patch)
treed08c81de02b94da202195d84c99e192bc24ae69e /xorg-server/dix/devices.c
parentaaeb8bf497c82efabc4f9b27c319042c0e72d816 (diff)
downloadvcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.gz
vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.bz2
vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.zip
mesa xkeyboard-config xserver git update 15 jan 2014
xserver commit 2d2d49dab5c5718989de97d7227aac793479745e xkeyboard-config commit 78af7aa79c6552924295644b911e45d07a0fcdad mesa commit a05c596a00916ce6a9c9d35ff36cd1e401fddd43
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r--xorg-server/dix/devices.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index a680ed8d7..45de713ce 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -386,7 +386,7 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
}
else {
if (dev->coreEvents)
- other = (IsPointerDevice(dev)) ? inputInfo.pointer :
+ other = (IsPointerDevice(dev)) ? inputInfo.pointer:
inputInfo.keyboard;
else
other = NULL; /* auto-float non-core devices */
@@ -586,7 +586,7 @@ ActivateDevice(DeviceIntPtr dev, BOOL sendevent)
* The actual task of ringing the bell is the job of the DDX.
*/
static void
-CoreKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something)
+CoreKeyboardBell(int volume, DeviceIntPtr pDev, void *arg, int something)
{
KeybdCtrl *ctrl = arg;
@@ -750,7 +750,7 @@ InitAndStartDevices(void)
* Free the given device class and reset the pointer to NULL.
*/
static void
-FreeDeviceClass(int type, pointer *class)
+FreeDeviceClass(int type, void **class)
{
if (!(*class))
return;
@@ -818,7 +818,7 @@ FreeDeviceClass(int type, pointer *class)
}
static void
-FreeFeedbackClass(int type, pointer *class)
+FreeFeedbackClass(int type, void **class)
{
if (!(*class))
return;
@@ -906,19 +906,19 @@ FreeAllDeviceClasses(ClassesPtr classes)
if (!classes)
return;
- FreeDeviceClass(KeyClass, (pointer) &classes->key);
- FreeDeviceClass(ValuatorClass, (pointer) &classes->valuator);
- FreeDeviceClass(XITouchClass, (pointer) &classes->touch);
- FreeDeviceClass(ButtonClass, (pointer) &classes->button);
- FreeDeviceClass(FocusClass, (pointer) &classes->focus);
- FreeDeviceClass(ProximityClass, (pointer) &classes->proximity);
+ FreeDeviceClass(KeyClass, (void *) &classes->key);
+ FreeDeviceClass(ValuatorClass, (void *) &classes->valuator);
+ FreeDeviceClass(XITouchClass, (void *) &classes->touch);
+ FreeDeviceClass(ButtonClass, (void *) &classes->button);
+ FreeDeviceClass(FocusClass, (void *) &classes->focus);
+ FreeDeviceClass(ProximityClass, (void *) &classes->proximity);
- FreeFeedbackClass(KbdFeedbackClass, (pointer) &classes->kbdfeed);
- FreeFeedbackClass(PtrFeedbackClass, (pointer) &classes->ptrfeed);
- FreeFeedbackClass(IntegerFeedbackClass, (pointer) &classes->intfeed);
- FreeFeedbackClass(StringFeedbackClass, (pointer) &classes->stringfeed);
- FreeFeedbackClass(BellFeedbackClass, (pointer) &classes->bell);
- FreeFeedbackClass(LedFeedbackClass, (pointer) &classes->leds);
+ FreeFeedbackClass(KbdFeedbackClass, (void *) &classes->kbdfeed);
+ FreeFeedbackClass(PtrFeedbackClass, (void *) &classes->ptrfeed);
+ FreeFeedbackClass(IntegerFeedbackClass, (void *) &classes->intfeed);
+ FreeFeedbackClass(StringFeedbackClass, (void *) &classes->stringfeed);
+ FreeFeedbackClass(BellFeedbackClass, (void *) &classes->bell);
+ FreeFeedbackClass(LedFeedbackClass, (void *) &classes->leds);
}
@@ -955,7 +955,7 @@ CloseDevice(DeviceIntPtr dev)
while (dev->xkb_interest)
XkbRemoveResourceClient((DevicePtr) dev, dev->xkb_interest->resource);
- free(dev->name);
+ free((void *) dev->name);
classes = (ClassesPtr) &dev->key;
FreeAllDeviceClasses(classes);
@@ -2735,6 +2735,7 @@ AllocDevicePair(ClientPtr client, const char *name,
{
DeviceIntPtr pointer;
DeviceIntPtr keyboard;
+ char *dev_name;
*ptr = *keybd = NULL;
@@ -2745,12 +2746,12 @@ AllocDevicePair(ClientPtr client, const char *name,
if (!pointer)
return BadAlloc;
- if (asprintf(&pointer->name, "%s pointer", name) == -1) {
- pointer->name = NULL;
+ if (asprintf(&dev_name, "%s pointer", name) == -1) {
RemoveDevice(pointer, FALSE);
return BadAlloc;
}
+ pointer->name = dev_name;
pointer->public.processInputProc = ProcessOtherEvent;
pointer->public.realInputProc = ProcessOtherEvent;
@@ -2771,13 +2772,13 @@ AllocDevicePair(ClientPtr client, const char *name,
return BadAlloc;
}
- if (asprintf(&keyboard->name, "%s keyboard", name) == -1) {
- keyboard->name = NULL;
+ if (asprintf(&dev_name, "%s keyboard", name) == -1) {
RemoveDevice(keyboard, FALSE);
RemoveDevice(pointer, FALSE);
return BadAlloc;
}
+ keyboard->name = dev_name;
keyboard->public.processInputProc = ProcessOtherEvent;
keyboard->public.realInputProc = ProcessOtherEvent;