summaryrefslogtreecommitdiff
path: root/dix/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/devices.c')
-rw-r--r--dix/devices.c9
1 files changed, 9 insertions, 0 deletions
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);