summaryrefslogtreecommitdiff
path: root/dix/access.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-02-18 17:25:15 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-02-18 17:25:15 +1030
commit6d9d18bf7708eb9e640ef732b5dc4c99aa6d5feb (patch)
tree02a00793421b5cc5c893a7fb7892d8f50c457852 /dix/access.c
parent088067c891a78670d9509f48f56bf3ff9c16a30d (diff)
dix: add support for WindowAccessAllowAll in device access checking.
AllowAll is the last check before the parent window is checked. This allows to override a DenyAll in the parent window in a simpler way than before (the previous method required all devices to be in the permit list).
Diffstat (limited to 'dix/access.c')
-rw-r--r--dix/access.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dix/access.c b/dix/access.c
index e7d39b4c3..dc66db897 100644
--- a/dix/access.c
+++ b/dix/access.c
@@ -254,6 +254,7 @@ ACQueryWindowAccess(WindowPtr win,
* If the device is explicitely permitted, allow.
* If the window has a default of DenyAll, do not allow.
* If the device is explicitely denied, do not allow.
+ * If the window has a default of AllowAll, allow.
* Check parent window. Rinse, wash, repeat.
* If no rule could be found, allow.
*/
@@ -309,6 +310,9 @@ ACDeviceAllowed(WindowPtr win, DeviceIntPtr dev, xEvent* xE)
return False;
}
+ if (win->optional->access.defaultRule == WindowAccessAllowAll)
+ return True;
+
return ACDeviceAllowed(win->parent, dev, xE);
}