EGL: undef X11 macros

Including egl.h may transitively include X headers which define a bunch
of macros that clash against our code. Undef these macros just after EGL
is included. This was already done locally in eglfs, but the same
problem appears in any code that uses qt_egl_p.h, like the Wayland
platform plugin.

Change-Id: I2fbd617f57de6ae7366795aabacd81c639903699
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Giuseppe D'Angelo 2025-05-30 11:46:36 +02:00
parent f6126ccb1c
commit 89ec9276fc
2 changed files with 14 additions and 12 deletions

View File

@ -43,6 +43,20 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
#ifndef QT_EGL_NO_X11
#undef Status
#undef None
#undef Bool
#undef CursorShape
#undef KeyPress
#undef KeyRelease
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef Expose
#undef Unsorted
#endif
#include <stdint.h>
QT_BEGIN_NAMESPACE

View File

@ -27,18 +27,6 @@ QT_BEGIN_NAMESPACE
#define Q_EGLFS_EXPORT Q_DECL_IMPORT
#endif
#undef Status
#undef None
#undef Bool
#undef CursorShape
#undef KeyPress
#undef KeyRelease
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef Expose
#undef Unsorted
QT_END_NAMESPACE
#endif