From 2039c6ea43244339659323d05d96c14e41996c20 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Jul 2008 22:10:17 +0930 Subject: Xi: add support for input device properties. Basically just copied from randr properties, with minor changes only. Each device supports arbitrary properties that can be modified by clients. Modifications to the properties are passed to the driver (if applicable) and can then affect the configuration of the device. Note that device properties are limited to a specific device. A property set on a slave device does not migrate to the master. --- dix/devices.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dix/devices.c') diff --git a/dix/devices.c b/dix/devices.c index 0a68c0e61..df53613c3 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -83,6 +83,7 @@ SOFTWARE. #include "exglobals.h" #include "exevents.h" #include "listdev.h" /* for CopySwapXXXClass */ +#include "xiproperty.h" /** @file * This file handles input device-related stuff. @@ -173,6 +174,12 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) memset(dev->last.valuators, 0, sizeof(dev->last.valuators)); dev->last.numValuators = 0; + /* device properties */ + dev->properties = NULL; + dev->SetProperty = NULL; + dev->GetProperty = NULL; + dev->pendingProperties = FALSE; + /* security creation/labeling check */ if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixCreateAccess)) { @@ -770,6 +777,8 @@ CloseDevice(DeviceIntPtr dev) if (!dev) return; + XIDeleteAllDeviceProperties(dev); + if (dev->inited) (void)(*dev->deviceProc)(dev, DEVICE_CLOSE); -- cgit v1.2.3