aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/xiproperty.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
commit4c61bf84b11e26e6f22648668c95ea760a379163 (patch)
tree0ac762ab2815eae283dded7447ad7cb5a54b926a /xorg-server/Xi/xiproperty.c
parente1dabd2ce8be0d70c6c15353b58de256129dfd1f (diff)
downloadvcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.gz
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.bz2
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.zip
xserver git update 11/6/2010
Diffstat (limited to 'xorg-server/Xi/xiproperty.c')
-rw-r--r--xorg-server/Xi/xiproperty.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/xorg-server/Xi/xiproperty.c b/xorg-server/Xi/xiproperty.c
index 4f8d2430d..11739f9ae 100644
--- a/xorg-server/Xi/xiproperty.c
+++ b/xorg-server/Xi/xiproperty.c
@@ -177,7 +177,9 @@ static struct dev_properties
{0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP},
{0, BTN_LABEL_PROP_BTN_GEAR_DOWN},
- {0, BTN_LABEL_PROP_BTN_GEAR_UP}
+ {0, BTN_LABEL_PROP_BTN_GEAR_UP},
+
+ {0, XI_PROP_TRANSFORM}
};
static long XIPropHandlerID = 1;
@@ -252,18 +254,18 @@ get_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type,
if (!ValidAtom(property))
{
client->errorValue = property;
- return(BadAtom);
+ return BadAtom;
}
if ((delete != xTrue) && (delete != xFalse))
{
client->errorValue = delete;
- return(BadValue);
+ return BadValue;
}
if ((type != AnyPropertyType) && !ValidAtom(type))
{
client->errorValue = type;
- return(BadAtom);
+ return BadAtom;
}
for (prop = dev->properties.properties; prop; prop = prop->next)
@@ -348,12 +350,12 @@ check_change_property(ClientPtr client, Atom property, Atom type, int format,
if (!ValidAtom(property))
{
client->errorValue = property;
- return(BadAtom);
+ return BadAtom;
}
if (!ValidAtom(type))
{
client->errorValue = type;
- return(BadAtom);
+ return BadAtom;
}
return Success;
@@ -620,8 +622,7 @@ XIFetchDeviceProperty(DeviceIntPtr dev, Atom property)
static void
XIDestroyDeviceProperty (XIPropertyPtr prop)
{
- if (prop->value.data)
- free(prop->value.data);
+ free(prop->value.data);
free(prop);
}
@@ -682,7 +683,7 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient)
if (handler->DeleteProperty)
rc = handler->DeleteProperty(device, prop->propertyName);
if (rc != Success)
- return (rc);
+ return rc;
handler = handler->next;
}
}
@@ -719,7 +720,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
{
prop = XICreateDeviceProperty (property);
if (!prop)
- return(BadAlloc);
+ return BadAlloc;
add = TRUE;
mode = PropModeReplace;
}
@@ -731,9 +732,9 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
"PropModeReplace" since they will be written over. */
if ((format != prop_value->format) && (mode != PropModeReplace))
- return(BadMatch);
+ return BadMatch;
if ((prop_value->type != type) && (mode != PropModeReplace))
- return(BadMatch);
+ return BadMatch;
new_value = *prop_value;
if (mode == PropModeReplace)
total_len = len;
@@ -796,9 +797,8 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
&new_value, checkonly);
if (checkonly && rc != Success)
{
- if (new_value.data)
- free(new_value.data);
- return (rc);
+ free(new_value.data);
+ return rc;
}
}
handler = handler->next;
@@ -806,8 +806,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
checkonly = !checkonly;
} while (!checkonly);
}
- if (prop_value->data)
- free(prop_value->data);
+ free(prop_value->data);
*prop_value = new_value;
} else if (len == 0)
{
@@ -824,7 +823,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
send_property_event(dev, prop->propertyName,
(add) ? XIPropertyCreated : XIPropertyModified);
- return(Success);
+ return Success;
}
int
@@ -957,7 +956,7 @@ ProcXDeleteDeviceProperty (ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return (BadAtom);
+ return BadAtom;
}
rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE);
@@ -1200,7 +1199,7 @@ ProcXIDeleteProperty(ClientPtr client)
if (!ValidAtom(stuff->property))
{
client->errorValue = stuff->property;
- return (BadAtom);
+ return BadAtom;
}
rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE);