From 4c61bf84b11e26e6f22648668c95ea760a379163 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 11 Jun 2010 12:14:52 +0000 Subject: xserver git update 11/6/2010 --- xorg-server/Xi/xiproperty.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'xorg-server/Xi/xiproperty.c') 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); -- cgit v1.2.3