From 6d9d18bf7708eb9e640ef732b5dc4c99aa6d5feb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Feb 2008 17:25:15 +1030 Subject: [PATCH] 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). --- dix/access.c | 4 ++++ 1 file changed, 4 insertions(+) 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); }