Skip to content

Commit a64e5f8

Browse files
keithel-qtlanglor-autodesk
authored andcommitted
Cater to upstream changes in eglplatform.h
EGL_NO_X11 has been replaced with USE_X11, which breaks all existing code out there including Qt: KhronosGroup/EGL-Registry#130 Fix this by defining USE_X11 wherever we do not define EGL_NO_X11. This is a manual backport/rewrite to Qt 5.15 of https://codereview.qt-project.org/c/qt/qtbase/+/371780 (Targetting Qt6) Fixes: QTBUG-96392 Change-Id: I86494881329e5baafc6a07b687b8ea6d84c827d5
1 parent d2a08eb commit a64e5f8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/gui/configure.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,8 @@
834834
"// embedded devices, are not intended to be used together with X. EGL support",
835835
"// has to be disabled in plugins like xcb in this case since the native display,",
836836
"// window and pixmap types will be different than what an X-based platform",
837-
"// plugin would expect."
837+
"// plugin would expect.",
838+
"#define USE_X11"
838839
],
839840
"include": [ "EGL/egl.h", "X11/Xlib.h" ],
840841
"main": [

src/platformsupport/eglconvenience/qt_egl_p.h

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
# if !defined(Q_OS_INTEGRITY)
6262
# define WIN_INTERFACE_CUSTOM // NV
6363
# endif // Q_OS_INTEGRITY
64+
#else // QT_EGL_NO_X11
65+
// if one has an eglplatform.h with https://github.com/KhronosGroup/EGL-Registry/pull/130
66+
// that needs USE_X11 to be defined.
67+
# define USE_X11
6468
#endif // QT_EGL_NO_X11
6569

6670
#ifdef QT_EGL_WAYLAND

0 commit comments

Comments
 (0)