Commit Graph

11969 Commits

Author SHA1 Message Date
Albrecht Schlosser
2bc7211058 Update README.md for release 1.4.4 2025-07-15 14:28:56 +02:00
Albrecht Schlosser
75f3bdfa55 Improve test/threads demo program (backported from 1.5)
- use Fl_Terminal instead of Fl_Browser for prime display
- add Fl::lock()/Fl::unlock() at thread initialization
- format "Max Prime" output as integer number
- use a fixed font for better readability
- close all windows when the user closes one of them
- use standard background and text colors

Note: This commit is a compromise. The version in FLTK 1.5 uses
  std::vector<> and can't be fully backported to 1.4.
2025-07-14 17:00:23 +02:00
Albrecht Schlosser
a5d2d19a23 Fix usage of 'volatile' in src/Fl_JPEG_Image.cxx (#1207)
- allocate a new struct 'load_stat' on the heap
- use struct load_stat to open image file (fp) and for error counters

The previous fix of #1207 unfortunately decremented volatile variables
which caused (plausible) compiler warnings by clang.

Backported from master (340caa2dc3)
2025-06-27 16:26:41 +02:00
ManoloFLTK
39c7800267 Fix "Selecting menus from the menubar under Wayland when in fullscreen" (#1264) 2025-06-11 08:45:20 +02:00
ManoloFLTK
1abdeda280 macOS: protect uses of __block by #if defined(__BLOCKS__) condition 2025-06-04 09:48:44 +02:00
ManoloFLTK
4ef65f304e Add CMake build option FLTK_USE_DBUS to allow build w/o dbus (PR #1252) 2025-06-04 09:25:42 +02:00
ManoloFLTK
5b7e358153 Restore use of build option FLTK_USE_POLL 2025-06-03 08:51:50 +02:00
ManoloFLTK
362f58c93b Wayland: fix for "A flag to set how menus should show up" (#1260)
This corresponds to ac0a5d5, 86a8d13, c13594f,  and 9a5e3b9 from FLTK's master branch.
2025-05-31 15:23:46 +02:00
Albrecht Schlosser
c8bab97d6a Fl_Window::free_position() must not be deprecated
This method was erroneously declared 'deprecated' in previous versions.

However, this method is public and calls the *protected* method
Fl_Window::force_position(). Therefore it is kept as a regular
public method.

Backported from master: 0960f1c066
2025-05-14 19:08:42 +02:00
ManoloFLTK
7c93e280da Wayland: remove crash when resizing hidden subwindow 2025-05-10 21:55:57 +02:00
Greg Ercolano
469249f91a Fl_Terminal doc fixes, private->protected for utf8_char_at_*() 2025-05-09 09:43:10 -07:00
Albrecht Schlosser
b21b7feaaa Fix Doxygen warning for older Doxygen versions
Note: doxygen versions < 1.9.6 are not recommended for PDF docs
      but *may* work for HTML documentation.

Backported from master: 719642b5d6
2025-04-29 20:17:43 +02:00
Albrecht Schlosser
aaabff4393 Fix release date of FLTK 1.4.3 in CHANGES.txt 2025-04-29 13:40:25 +02:00
Albrecht Schlosser
3e82e0b6d9 Update CHANGES.txt for release 1.4.3 2025-04-28 18:43:35 +02:00
Albrecht Schlosser
4ef7d5be4e macOS: disable automatic code signing when using Xcode
This is the default. Users can still override this if they have
  a valid certificate.

Backported from master: e0802889d4.
2025-04-28 18:38:01 +02:00
Albrecht Schlosser
8d940f3581 Put fix for issue #1214 (Windows "solid lines") under ABI guards
Original issue title:
  "Windows: dotted lines may be drawn solid when GUI is rescaled"

Unfortunately commit 880636eb12 broke
  the ABI because it added a variable to a public header. This commit
  uses ABI guards '#if FL_ABI_VERSION >= 10403" for the same fix.

Note: The full fix w/o ABI guards is already available in FLTK 1.5.
2025-04-26 17:55:43 +02:00
Matthias Melcher
82d5679f9c Fix forgotten run_pdflatex call. 2025-04-23 15:41:32 +02:00
Matthias Melcher
2af2e1d586 Fluid: Backport update for documentation scripts
from 1.5 48e22d2, based on 678c850
2025-04-23 14:13:47 +02:00
Albrecht Schlosser
8ac2a99565 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.

Backported from 'master' (1066b69c8e).
2025-04-21 22:00:35 +02:00
Albrecht Schlosser
709fdef10f Update version numbers to 1.4.3 2025-04-18 20:13:13 +02:00
MatthiasWM
6b84a5f668 Fix path to Fl_String.H
VisualStudio unfortunately messed up previous
commits. It should stick this time.
2025-04-18 18:22:18 +02:00
Mohammed Alyousef
f20215109e Fixes error: two consecutive '[' tokens on g++ with objcpp files (#1246)
Applying MoAlyousef's PR. -erco

(cherry picked from commit 8b8d92a313)
2025-04-18 18:17:04 +02:00
Albrecht Schlosser
eb2df89625 Update fltk-config.in (minor comment changes only)
(cherry picked from commit 1f715f8766)
2025-04-18 18:15:59 +02:00
Albrecht Schlosser
9bd68d9bf7 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.

(cherry picked from commit 5b648d2cfc)
2025-04-18 18:09:57 +02:00
MatthiasWM
8016a1fc95 Windows: Fix previous commit for Windows
Downgarde std::string to Fl_String
2025-04-18 18:08:14 +02:00
Matthias Melcher
2e47aeb384 Downgrade C++11 to C++98 calls.
Use Fl_String instead of std::string.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.

(cherry picked from commit 719fed2b13)
2025-04-18 18:03:52 +02:00
Matthias Melcher
89142ab507 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.

(cherry picked from commit 719fed2b13)
2025-04-18 17:56:17 +02:00
Matthias Melcher
5e82d0ba78 Fix potential buffer overflow on Windows when loading fonts (#1221)
This commit is bigger than necessary to fix the buffer allocation but
it also prevents some unnecessary string copies: the font name is
converted from UTF-16 to UTF-8 directly in the buffer used later.

Code reformatted and clarified as well, some duplicated code was
removed.

(cherry picked from commit 2e1730d2f0)
2025-04-18 17:48:55 +02:00
ManoloFLTK
e693353536 CI for Wayland: replace libgtk-3-dev by libdecor-0-dev libxfixes-dev libxcursor-dev libxinerama-dev
(cherry picked from commit 1054e81504)
2025-04-18 17:19:52 +02:00
Matthias Melcher
4a48107e82 Fix handling of menu windows taller than their screen
A problem was visible with the menubar test app and a 2-screen system where screens are one above the other.
When moving down the huge menu, it became positioned on the wrong screen.

(cherry picked from commit f4f93fda15)
2025-04-18 17:18:24 +02:00
Matthias Melcher
a7c4b4eb7d Fix comparison that's always true
... because base_dir[0] and dest_dir[0] are *signed* chars.
(Backport from FLTK 1.5)
2025-04-17 15:28:16 +02:00
Matthias Melcher
80ec48e95e Revised version of the glpuzzle man page
Backported from master (76e76ba80a).
2025-04-11 14:56:14 +02:00
ManoloFLTK
58b0b2b7e0 Fix "Minor drawing artifact at scale 200% under X11 session" (#1243) 2025-04-08 11:09:49 +02:00
Albrecht Schlosser
03dc76846d CMake: simplify fluid build
- define variable MAIN_FILES to avoid repetition
- make target_include_directories(fluid-lib) PUBLIC rather than PRIVATE

Backported and slightly modified from master,
  commit 61f132845b
2025-04-04 16:10:38 +02:00
Albrecht Schlosser
135debc5f3 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.

Backported from master (eb1e0f423d).
2025-04-04 16:01:38 +02:00
Aaron Ucko
6b8409fc6c
Use CMake's built-in timestamp formatting (#1242)
* 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.

Under the traditional build system, don't attempt to handle
SOURCE_DATE_EPOCH because date's portable interface is too limited,
just supply PDF_DATE and TODAY values corresponding to the current
date (and time zone) and use the C (English) locale for month names
and abbreviations.

* Fix missing parts and a syntax error in documentation/Makefile

- documentation/Makefile:
  - add make_pdf to target 'clean'
  - add make_pdf to dependencies of 'refman.pdf'
  - add missing quotes to `date` command

- documentation/.gitignore: add make_pdf

---------

Co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
2025-04-03 01:49:59 +02:00
Albrecht Schlosser
838b7b98ea 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.

(Backported from master)
2025-04-02 20:01:15 +02:00
Aaron M. Ucko
2e6e94d118 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:16:25 +02:00
Albrecht Schlosser
6336959306 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 the next release.
2025-03-29 20:57:53 +01:00
Greg Ercolano
26d183ca77 Changed two connector methods to virtual
For reference, see fltk.general thread started Mar 26 2025, entitled:
    "Make some Fl_Tree_Item methods virtual?"

Backported Greg's commit from master (1.5.0) by Albrecht-S,
    added ABI guards for FLTK 1.4.3
2025-03-29 20:21:08 +01:00
ManoloFLTK
caabc3c2a8 Fix: Windows: Clipboard gets stuck when text is copied while window is hidden (#1233) 2025-03-25 17:33:10 +01:00
ManoloFLTK
880636eb12 Fix "Windows: dotted lines may be drawn solid when GUI is rescaled" (#1214) 2025-03-04 16:04:10 +01:00
ManoloFLTK
257435dca0 Remove deprecated, commented-out code.
This code was used in the past to support a deprecated way to obtain the initial
value of the GUI scaling factor for the X11 platform.
2025-02-24 12:12:07 +01:00
Albrecht Schlosser
a206a778b4 Update CHANGES.txt and ANNOUNCEMENT for release 1.4.2 2025-02-23 12:34:18 +01:00
ManoloFLTK
5b617a6cc1 Fix "Fl_RGB_Image::draw() seg faults when offset is too big" - cont'd (#1211) 2025-02-22 09:02:01 +01:00
ManoloFLTK
e27edad5f1 Fix "Fl_RGB_Image::draw() seg faults when offset is too big" (#1211) 2025-02-22 08:33:20 +01:00
ManoloFLTK
7ce2632bfc Fix "Wayland: resizing window may crash the program" (#1210) 2025-02-21 21:16:02 +01:00
Albrecht Schlosser
e932b94436 Update dependencies 2025-02-21 20:12:57 +01:00
Albrecht Schlosser
02af6a57eb Bump version numbers to 1.4.2 2025-02-21 16:25:39 +01:00
Albrecht Schlosser
97f2cdcc29 Fix copyright, a typo, and remaining casts (#1207)
make remaining casts consistent with other casts of the same
variables
2025-02-21 13:37:22 +01:00