GLXContextID glXGetContextIDEXT( const GLXContext ctx)
No round trip is forced to the server; unlike most X calls that return a value, glXGetContextIDEXT does not flush any pending events.
glXGetContextIDEXT is part of the EXT_import_context extension, not part of the core GLX command set. If GLX_EXT_import_context is included in the string returned by glXQueryExtensionsString, when called with argument GLX_EXTENSIONS, extension EXT_import_context is supported.