From dd35c17a2c9fadd27075ae59be09f4ca00be5868 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Sat, 13 Jun 2026 15:57:09 +0700 Subject: [PATCH 1/2] Include FLTK platform + X11 headers explicitly for the X11 build main-window, modal-dialog and option-dialogs use fl_display, fl_xid, Pixmap and XA_CARDINAL under #ifndef _WIN32 but only included . These resolved transitively on FLTK <= 1.4.4 but not on FLTK 1.4.5's cleaned-up headers, so the X11 build fails with 'fl_display'/'XA_CARDINAL' not declared. Add the includes to the shared utils.h. Built on Ubuntu 26.04, GCC 15, FLTK 1.4.5. --- src/utils.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils.h b/src/utils.h index bc90a11..722f9e4 100644 --- a/src/utils.h +++ b/src/utils.h @@ -13,6 +13,11 @@ #pragma warning(push, 0) #include +#ifndef _WIN32 +#include +#include +#include +#endif #pragma warning(pop) #ifdef _WIN32 From 07ce5f999f794c191f57316fe3dd2f087dfcca2a Mon Sep 17 00:00:00 2001 From: Will Norris Date: Sat, 13 Jun 2026 16:45:40 +0700 Subject: [PATCH 2/2] Include FL/x11.H explicitly when building with X11 support main-window, modal-dialog and option-dialogs use fl_display, fl_xid, Pixmap and XA_CARDINAL, which are declared in FL/x11.H. On FLTK <= 1.4.4 these came in transitively; FLTK 1.4.5 cleaned up its headers. Add an explicit include guarded by FLTK_USE_X11 (defined in fl_config.h, already pulled in via FL/fl_types.h) so the fix works for both X11-only and hybrid Wayland+X11 builds. FL/x11.H itself includes X11/Xlib.h, X11/Xutil.h, and X11/Xatom.h, so no separate X11 includes are needed. Built on Ubuntu 26.04, GCC 15, FLTK 1.4.5 X11-only and Wayland+X11. --- src/utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.h b/src/utils.h index 722f9e4..ae68ab8 100644 --- a/src/utils.h +++ b/src/utils.h @@ -14,9 +14,9 @@ #pragma warning(push, 0) #include #ifndef _WIN32 -#include -#include -#include +# ifdef FLTK_USE_X11 +# include +# endif #endif #pragma warning(pop)