[PATCH xserver 2/4] dix: Allow an extension to disable itself

Adam Jackson ajax at redhat.com
Mon Apr 23 20:19:13 UTC 2018


GLX registers an extension before we know if there are any screens that
can actually do it. It's inconvenient to shrink the extension list, so
instead allow the extension to simply zero out its base opcode to
indicate that it needed to panic and disable itself.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 dix/extension.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dix/extension.c b/dix/extension.c
index 7d432c7224..9c158ba937 100644
--- a/dix/extension.c
+++ b/dix/extension.c
@@ -215,6 +215,8 @@ ExtensionAvailable(ClientPtr client, ExtensionEntry *ext)
 {
     if (XaceHook(XACE_EXT_ACCESS, client, ext) != Success)
         return FALSE;
+    if (!ext->base)
+        return FALSE;
     return TRUE;
 }
 
-- 
2.17.0



More information about the xorg-devel mailing list