Commit Graph

12026 Commits

Author SHA1 Message Date
Matthias Melcher
9af8abc080 Fix forgotten run_pdflatex call (1.5) 2025-04-23 15:47:31 +02:00
Albrecht Schlosser
1066b69c8e Fix "fully support ... own shared libraries" (#1238)
- If shared libraries are built, then fluid, fltk-options, and the
  "games" are linked against the shared FLTK libraries. On some
  platforms the static and the shared versions of fluid and
  fltk-options are built. The games are only built if
  FLTK_BUILD_TEST is enabled.

- The CMake 'install' target now installs the games (if built)
  and their man pages on all platforms (no matter if that is
  useful, for instance on Windows).

- On macOS 'CMAKE_INSTALL_RPATH' is set so *installed* programs
  automatically find their shared FLTK libraries. The "shared"
  versions of fluid and fltk-options got their own '.plist' files.
  This works for both the executables themselves as well as those
  included in bundles. There may be more to do on the macOS platform.
2025-04-21 19:50:12 +02:00
Matthias Melcher
48e22d246d Fluid: update documentation scripts
TeX and pdf generation untested at this point
2025-04-18 21:40:37 +02:00
Albrecht Schlosser
374f22b8bf Remove unused code from Fl_Wayland_Window_Driver (#1248)
This commit removes the unused static method

  Fl_Wayland_Window_Driver::resize_after_screen_change(void *data)

and related data as discussed in the context of PR #1248.
2025-04-18 18:23:28 +02:00
Timothy Lee
002b69f8fe Fix "heap-use-after-free" in resize_after_screen_change() (#1248)
When a native window is destroyed, make sure the callback to
Fl_WinAPI_Window_Driver::resize_after_screen_change() is removed.

Added by Albrecht-S:

Thanks for the original fix to Timothy Lee (@timothytylee).

src/drivers/X11/Fl_X11_Window_Driver.cxx: equivalent fix for X11
  as discussed on GitHub PR #1248
2025-04-18 18:15:06 +02:00
Matthias Melcher
219c623b4b Fluid: hiding MergeBack form the main menu.
Hiding menuitem if option is not available.
Also testing the new FL_BEFORE_MENU event.
2025-04-15 15:28:37 +02:00
Matthias Melcher
fc91880faf
Reactivating Mergeback functionality. (#1226)
Reactivated code.
Various fixes.
New documentation.
2025-04-15 14:47:24 +02:00
Matthias Melcher
63db80c078 Fluid: avoid bad function pointer casting warning in Clang 17. 2025-04-15 14:38:45 +02:00
Matthias Melcher
76e76ba80a Revised version of the glpuzzle man page. 2025-04-07 00:29:41 +02:00
Greg Ercolano
ed57306a43 Adjusted .fl files too, regen code (#1245) 2025-04-06 08:21:31 -07:00
Mohammed Alyousef
8b8d92a313
Fixes error: two consecutive '[' tokens on g++ with objcpp files (#1246)
Applying MoAlyousef's PR. -erco
2025-04-05 15:05:39 -07:00
Greg Ercolano
70a104131a Solve Mac 10.10.5 fluid build errors (#1245) 2025-04-05 14:53:24 -07:00
Albrecht Schlosser
61f132845b CMake: simplify fluid build
- define variable MAIN_FILES to avoid repetition
- make target_include_directories(fluid-lib) PUBLIC rather than PRIVATE
2025-04-04 15:54:36 +02:00
Albrecht Schlosser
eb1e0f423d Update man pages of games (demo programs), add glpuzzle.man
Prepare for installation of `games` demo programs. Fix inconsistencies
and typos in man pages. In the future the man pages can be installed
together with the executables. This will be done in a later commit.

documentation/src/glpuzzle.man: new file.
2025-04-04 15:50:36 +02:00
Albrecht Schlosser
f0a5146359 Remove reference to 'configure', fix typos
Note: this file is not used in normal compilation, it can be used
to help debugging. I'm not sure if it's still helpful, but anyway...
2025-04-04 14:44:21 +02:00
ManoloFLTK
3cd3537ef8 Update bundled libdecor to last upstream version (Apr 4, 2025) 2025-04-04 12:06:00 +02:00
Albrecht Schlosser
fb48bc22cc Remove redundant Fl_Group::clear() from ~Fl_Scroll()
Fl_Group::clear() is called in Fl_Group's d'tor anyway.

Technically we don't need to remove hscrollbar and scrollbar because
they are destroyed (and thus removed from Fl_Group) before Fl_Group's
d'tor is executed but this is left for clarity and to guarantee the
order (see comment).
2025-04-03 17:11:25 +02:00
ManoloFLTK
c340c4a2bd Fix "Minor drawing artifact at scale 200% under X11 session" (#1243) 2025-04-03 11:28:02 +02:00
ManoloFLTK
71caca84d9 Merge remote-tracking branch 'refs/remotes/origin/master' 2025-04-03 11:23:57 +02:00
Aaron M. Ucko
678c850272 Use CMake's built-in timestamp formatting.
It notably honors SOURCE_DATE_EPOCH if set, making for reproducible
output.  For even better reproducibility, use UTC.  (Unlike the date
command's output, the result is already always in English.)  Extend
this approach to the book, introducing appropriately formatted
PDF_DATE and TODAY variables for its PDF metadata and title page
respectively and making make_pdf configurable.
2025-04-02 20:25:07 +02:00
Albrecht Schlosser
794d493eb6 CMake: check version for some properties in fl_debug_target()
Debug only, if fl_debug_target() is used:

Prior to CMake 3.19 some properties of "INTERFACE_LIBRARY targets"
can't be read with get_property(). These properties are now
excluded if the CMake version is lower than 3.19.
2025-04-02 19:59:56 +02:00
Aaron M. Ucko
8b28e38942 options.cmake: Check Threads_FOUND, not CMAKE_HAVE_THREADS_LIBRARY
The former's been available since CMake v2.8 and documented since v3.17;
the latter was never documented and quietly went away in CMake v3.24.
2025-04-01 19:12:10 +02:00
Matthias Melcher
f4978a0149 Adding the FL_MENU_CHATTY flag to Fl_Menu_Item.
If set, menu items will also call the callback when highlighting changes.
The reason is given with Fl::callback_reason(). #941
2025-04-01 17:00:56 +02:00
Matthias Melcher
0eb6bb8e6d Fixing a few more compiler warnings. 2025-03-30 00:51:34 +01:00
Matthias Melcher
bd9d1bc038 Fixes a couple of compiler warnings on AppleClang. 2025-03-30 00:38:10 +01:00
Matthias Melcher
b2b5e47ede Somewhat better example for dynamic tooltip. 2025-03-30 00:25:18 +01:00
Matthias Melcher
61c2b798be Adding missing overrides 2025-03-29 23:52:29 +01:00
Matthias Melcher
5dd1062df5 Adding FL_BEFORE_MENU event to classes derived from Fl_Menu_ 2025-03-29 23:36:19 +01:00
Matthias Melcher
b7189192e2 Adds a new event FL_TOOLTIP_EVENT...
... and Fl_Tootip::override_text() to allow users to dynamically
generate tooltips.
2025-03-29 22:40:18 +01:00
Albrecht Schlosser
cb86a37676 Allow FL_ABI_VERSION = FL_API_VERSION + 1
... so users can enable ABI features designated for the *next* release
when using FLTK from Git (or snapshots) before the API version has
been raised for that release.
2025-03-29 21:03:18 +01:00
Greg Ercolano
9e1e043af3 Changed two connector methods to virtual
For reference, see fltk.general thread started Mar 26 2025, entitled:
    "Make some Fl_Tree_Item methods virtual?"
2025-03-28 12:54:16 -07:00
Albrecht Schlosser
1f715f8766 Update fltk-config.in (minor comment changes only) 2025-03-27 16:14:29 +01:00
Albrecht Schlosser
6db6a9d8b8 Remove reference to 'configure' from comment
Explain details of the mentioned 'hack' referring to and citing
parts of the original commit log.
2025-03-27 15:04:55 +01:00
Albrecht Schlosser
8424af743b Disallow in-source builds
Rationale:

1. Building in-source creates a lot of untracked files in the source
   tree. We need to take care not to commit any of them, hence we
   have to maintain .gitignore files in several directories.

2. Tests reveal that there are even files in git that are modified
   in the source tree when building docs etc. which means e.g.
   that builds can't be "repeated" after upgrading the sources, and
   that those files could be committed by accident. To avoid this
   we'd have to reorganize the build procedure and make it even more
   complex rather than simplifying it.

3. With autoconf/configure/make we didn't have a choice, i.e. we had
   to allow in-source builds with configure/Makefiles anyway. This
   is no longer true since we removed configure/make support.

Note, todo: if this commit doesn't introduce unexpected issues, then
   we can remove a lot of stuff from the .gitignore files, but this
   is left for a later commit.
2025-03-25 18:55:21 +01:00
ManoloFLTK
d756076644 Fix: Windows: Clipboard gets stuck when text is copied while window is hidden (#1233) 2025-03-25 17:31:25 +01:00
Matthias Melcher
de3b521f11 Upadate macOS README. 2025-03-24 11:26:34 +01:00
Albrecht Schlosser
80c73b508c Fluid documentation: fix image name "main_window.png"
Remove prefix "Fluid." from generated image name.
2025-03-23 15:04:40 +01:00
ManoloFLTK
07bb343de7 Update documentation of the Wayland platform implementation 2025-03-20 11:19:33 +01:00
ManoloFLTK
4b7cea676b Update bundled libdecor to last upstream version (9 mar 2025) 2025-03-19 15:20:48 +01:00
Albrecht Schlosser
1ccafa83b2 Remove obsolete build option 'FLTK_OPTION_STD'
This option is no longer needed since FLTK 1.5 always requires C++11.
2025-03-19 14:44:16 +01:00
ManoloFLTK
4b07ab391a Fix "FLTK apps broken under LabWC compositor" (#1231) 2025-03-19 14:09:57 +01:00
Albrecht Schlosser
5b648d2cfc Fix out-of-bounds access in test/checkers.cxx
For details please see description in the source code in
  test/checkers.cxx lines 620++

This commit also disables unused code: function dumpnode() which is
  used only in VT100 mode.
2025-03-18 20:31:48 +01:00
ManoloFLTK
3f4712957c Wayland: improve support of screen removal while FLTK runs 2025-03-18 18:17:49 +01:00
ManoloFLTK
622c1f1db8 Wayland: fix unsetting fullscreen state for window created fullscreen
In some multi-screen settings, the un-fullscreened window would leave its screen
but would not enter any screen.
2025-03-18 18:09:23 +01:00
ManoloFLTK
c2a4e2ca5c Fix "Inconsistent FL_FULLSCREEN when creating full-screen window" (#1225)
The commit has all platforms send the FL_FULLSCREEN event when a window is created fullscreen.
2025-03-18 16:59:48 +01:00
ManoloFLTK
d4efb77660 Fix "X11 library missing in fltk-config" (#1228) 2025-03-18 15:53:31 +01:00
Albrecht Schlosser
5fcca347c6 Fix comparison that's always true
... because base_dir[0] and dest_dir[0] are *signed* chars.
2025-03-17 20:28:47 +01:00
Albrecht Schlosser
719fed2b13 Windows: fix "heap-use-after-free" in home_directory_name()
Calling getenv() twice with different output vars and accessing both
later could cause "heap-use-after-free" error in some Windows versions.
The result of home_directory_name() would be unpredictable.

Found using Wine and/or MSYS2/clang/libc++ with Address Sanitizer.
2025-03-17 20:16:57 +01:00
ManoloFLTK
6b9fb46b96 Wayland: improve support of addition/removal of displays while FLTK runs 2025-03-17 14:49:17 +01:00
ManoloFLTK
ed4fded9d9 Wayland: compute work area size under MUTTER or when single display 2025-03-17 14:49:17 +01:00