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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user