xserver: Branch 'mpx'

Peter Hutterer whot at kemper.freedesktop.org
Mon Feb 18 00:15:24 PST 2008


 dix/access.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 6d9d18bf7708eb9e640ef732b5dc4c99aa6d5feb
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Mon Feb 18 17:25:15 2008 +1030

    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).

diff --git a/dix/access.c b/dix/access.c
index e7d39b4..dc66db8 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);
 }
 


More information about the xorg-commit mailing list