summaryrefslogtreecommitdiff
path: root/dix/inpututils.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-20 15:28:16 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-22 15:44:50 +1000
commitb12d302df8283186ce87882c29b2b0294adb2770 (patch)
tree7b2f4ce175d1a1aec64a354b922429b50dcc8bde /dix/inpututils.c
parentadd2defac7e59dcb355e5ba12b6de60861741d57 (diff)
Input: rename DeviceIntRec->isMaster to ->type.
isMaster is not enough as long as we differ between master pointers and keyboard. With flexible device classes, the usual checks for whether a master device is a pointer (currently check for ->button, ->valuators or ->key) do not work as an SD may post an event through a master and mess this check up. Example, a device with valuators but no buttons would remove the button class from the VCP and thus result in the IsPointerDevice(inputInfo.pointer) == FALSE. This will become worse in the future when new device classes are introduced that aren't provided in the current system (e.g. a switch class). This patch replaces isMaster with "type", one of SLAVE, MASTER_POINTER and MASTER_KEYBOARD. All checks for dev->isMaster are replaced with an IsMaster(dev).
Diffstat (limited to 'dix/inpututils.c')
-rw-r--r--dix/inpututils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dix/inpututils.c b/dix/inpututils.c
index 152214506..79b6ab7c7 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -268,9 +268,9 @@ change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap,
do_modmap_change(client, dev, modmap);
/* Change any attached masters/slaves. */
- if (dev->isMaster) {
+ if (IsMaster(dev)) {
for (tmp = inputInfo.devices; tmp; tmp = tmp->next) {
- if (!tmp->isMaster && tmp->u.master == dev)
+ if (!IsMaster(tmp) && tmp->u.master == dev)
if (check_modmap_change_slave(client, dev, tmp, modmap))
do_modmap_change(client, tmp, modmap);
}