diff options
| -rw-r--r-- | README.Wayland.txt | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/README.Wayland.txt b/README.Wayland.txt index 628b9162b..65a5c3a36 100644 --- a/README.Wayland.txt +++ b/README.Wayland.txt @@ -131,7 +131,7 @@ function or variable. The recommended way to prepare and use platform-specific code that would contain X11-specific and possibly Wayland-specific parts is as follows : -a) Organize platform-specific code as follows : +a) Organize platform-specific code as follows¹: #include <FL/platform.H> @@ -156,6 +156,21 @@ function or variable, and that fl_wl_display() returns non-NULL before using any Wayland-specific function or variable. Make sure that fl_open_display() was called directly or indirectly before using any such symbol. +¹ To be also compatible with macOS+XQuartz, a slightly different organization is necessary: + #include <FL/platform.H> + #if defined(FLTK_USE_X11) || defined(FLTK_USE_WAYLAND) + # ifdef FLTK_USE_X11 + *** X11-specific code which can run under Linux/Unix or under macOS+XQuartz *** + # endif + # ifdef FLTK_USE_WAYLAND + *** Wayland-specific code *** + # endif + #elif defined(__APPLE__) + *** macOS-specific code which doesn't run under XQuartz *** + #elif defined(_WIN32) + *** Windows-specific code *** + #endif + 3.3 Forcing an FLTK App to Always Use the X11 Backend ----------------------------------------------------- @@ -236,6 +251,3 @@ These packages are necessary to build the FLTK library and the sway compositor: git autoconf pkgconf xorg urwfonts gnome glew seatd sway dmenu-wayland dmenu evdev-proto Package installation command: sudo pkg install <package-name ...> - -If FLTK is built using the configure/make procedure, include argument "--enable-localzlib" -in the "configure" command. |
