dix: Allow an extension to disable itself

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@redhat.com>
This commit is contained in:
Adam Jackson 2018-04-23 16:19:13 -04:00
parent 73a1cb9c92
commit fc25bceb51
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}