Wayland doc: detail how to be compatible with macOS+XQuartz
This commit is contained in:
parent
868ab9696f
commit
b5793feb51
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user