glx: Set ContextTag for all contexts

Currently, xorgGlxMakeCurrent() would set the context tag only for
indirect GLX contexts.

However, several other places expect to find a context for the tag or
they would raise a GLXBadContextTag error, such as WaitGL() or WaitX().

Set the context tag for direct contexts as well, to avoid raising an
error and possibly killing the client and set currentClient.

Thanks to Erik Kurzinger <> for spotting the issue.

Signed-off-by: Olivier Fourdan <>
Reviewed-by: Adam Jackson <>
(cherry picked from commit c468d34c)
(cherry picked from commit aad61e8e)
3 jobs for xwayland-21.1-eglstream in 3 minutes (queued for 2 seconds)
Status Name Job ID Coverage
  Docker Image
passed debian-buster #11083178


  Build And Test
passed meson #11083179


passed meson-noglamor #11083180