[PATCH synaptics] Recognise the soft button area property is before clickpad is enabled

Peter Hutterer peter.hutterer at who-t.net
Wed Oct 3 22:20:36 PDT 2012


Otherwise the driver has no internal reference to the soft button area
property and will ignore any setting.

Also, if a client sets this property, we claim it as our own and disallow
deletion.

https://bugs.freedesktop.org/show_bug.cgi?id=54102

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/properties.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/properties.c b/src/properties.c
index 72ba896..dd88fc7 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -707,6 +707,16 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
     }
     else if (property == prop_product_id || property == prop_device_node)
         return BadValue;        /* read-only */
+    else { /* unknown property */
+        if (strcmp(SYNAPTICS_PROP_SOFTBUTTON_AREAS, NameForAtom(property)) == 0)
+        {
+            prop_softbutton_areas = property;
+            if (SetProperty(dev, property, prop, checkonly) != Success)
+                prop_softbutton_areas = 0;
+            else if (!checkonly)
+                XISetDevicePropertyDeletable(dev, property, FALSE);
+        }
+    }
 
     return Success;
 }
-- 
1.7.11.4



More information about the xorg-devel mailing list