summaryrefslogtreecommitdiff
path: root/include/input.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-23 10:50:52 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-01 08:46:31 +1000
commit0814f511d56a89c7b1868b17eba7a89f990b9ab1 (patch)
tree606dcc0cfe2e2cbed05f03f71400d6b872b83298 /include/input.h
parent1bcc0d3c244ce7d9f5cbab626aa5fd5784b41a1c (diff)
input: store the master device's ID in the devPrivate for XTest devices.
Rather than storing a simple boolean in the devPrivate for XTest devices, store the actual master device's id (since it is constant for the life of the device anyway). Callers should use GetXtstDevice now instead of digging around in the devPrivates themselves. This patch allows for a cleanup in the creation of new master devices since GetMaster and GetXtstDevice spare the need for loops, IsPointer checks and similar. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com>
Diffstat (limited to 'include/input.h')
-rw-r--r--include/input.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/input.h b/include/input.h
index 1dfbbff0b..40ba660f1 100644
--- a/include/input.h
+++ b/include/input.h
@@ -496,8 +496,11 @@ extern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map,
extern int AllocXtstDevice(ClientPtr client,
char* name,
DeviceIntPtr* ptr,
- DeviceIntPtr* keybd);
+ DeviceIntPtr* keybd,
+ DeviceIntPtr master_ptr,
+ DeviceIntPtr master_keybd);
extern BOOL IsXtstDevice(DeviceIntPtr dev, DeviceIntPtr master);
+extern DeviceIntPtr GetXtstDevice(DeviceIntPtr master);
/* misc event helpers */
extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);