Skip to content

x11: Make kwin and Qt share the same EGLDisplay

Vlad Zahorodnii requested to merge work/annoying-x11-egl-display into master

There are EGL implementations that will refuse to create a context if the share context belongs to other EGLDisplay. Currently, that's the case on some platforms.

If eglGetPlatformDisplayEXT() is called with the same parameters, it'll return the same EGLDisplay. The main motivation behind this change is to ensure that both kwin and Qt share the same EGLDisplay, QtXCB calls eglGetPlatformDisplayEXT() without any additional args.

If EGL_PLATFORM_X11_SCREEN_EXT is not specified via attrs, the EGL implementation will use the default screen, which is the same as m_x11ScreenNumber.


This is to ensure that both kwin and Qt use the same EGLDisplay. Note that the native context handle can have no display, however it's very unlikely to happen.

Merge request reports

Loading