From a8e918727a8a3796e359192b721f9aa262ae98a8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 1 Mar 2021 13:06:17 +0100 Subject: [PATCH] Only include X11 headers when we actually need X11 support These headers may not be available at all when building wxGTK with Wayland-only GTK version. --- src/unix/utilsx11.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index 41ccf8dbaf..2b5fa89732 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -13,8 +13,6 @@ // for compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/unix/utilsx11.h" - #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" @@ -26,16 +24,6 @@ #include "wx/apptrait.h" #include "wx/private/launchbrowser.h" -#ifdef __VMS -#pragma message disable nosimpint -#endif -#include -#include -#include -#ifdef __VMS -#pragma message enable nosimpint -#endif - #ifdef __WXGTK__ #ifdef __WXGTK20__ #include "wx/gtk/private/wrapgtk.h" @@ -60,6 +48,17 @@ GtkWidget* wxGetTopLevelGTK(); #ifdef wxHAS_X11_SUPPORT +#include "wx/unix/utilsx11.h" + +#ifdef __VMS +#pragma message disable nosimpint +#endif +#include +#include +#ifdef __VMS +#pragma message enable nosimpint +#endif + // Various X11 Atoms used in this file: static Atom _NET_WM_STATE = 0; static Atom _NET_WM_STATE_FULLSCREEN = 0;