From 28ab24cd5596e40cda866427ffa6cd16eff73e58 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 9 Oct 2018 15:28:28 +0200 Subject: [PATCH] Add missing wxUSE_DISPLAY check to X11 display header Don't define functions dealing with video modes etc when wxUSE_DISPLAY==0. --- include/wx/unix/private/displayx11.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/wx/unix/private/displayx11.h b/include/wx/unix/private/displayx11.h index ea993ca249..0a139a1d3e 100644 --- a/include/wx/unix/private/displayx11.h +++ b/include/wx/unix/private/displayx11.h @@ -10,6 +10,10 @@ #ifndef _WX_UNIX_PRIVATE_DISPLAYX11_H_ #define _WX_UNIX_PRIVATE_DISPLAYX11_H_ +#include "wx/defs.h" + +#if wxUSE_DISPLAY + #include "wx/log.h" #include "wx/translation.h" @@ -145,6 +149,8 @@ wxArrayVideoModes wxX11_GetModes(const wxDisplayImpl* impl, const wxVideoMode& m #endif // !HAVE_X11_EXTENSIONS_XF86VMODE_H +#endif // wxUSE_DISPLAY + void wxGetWorkAreaX11(Screen* screen, int& x, int& y, int& width, int& height) { Display* display = DisplayOfScreen(screen);