diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-02-14 12:42:36 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-02-15 06:41:49 +0100 |
| commit | b5793feb5128f3a484626b1f436351ca8854a677 (patch) | |
| tree | f6172d31d71914a5d0e192d3fa6fe1affd552437 /README.Wayland.txt | |
| parent | 868ab9696fb51628afac1ea10f7df6a27907a089 (diff) | |
Wayland doc: detail how to be compatible with macOS+XQuartz
Diffstat (limited to 'README.Wayland.txt')
| -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. |
