Commit Graph

11904 Commits

Author SHA1 Message Date
ManoloFLTK
bc764dabc1 Avoid code repetitions among Fl_{X11_}Window_Driver::{un_}maximize() functions 2025-02-03 09:34:19 +01:00
Albrecht Schlosser
0c7ed2b44f Document "New FL_HELVETICA Font on Windows" (#478)
This commit adds only documentation.
2025-02-01 20:39:28 +01:00
Albrecht Schlosser
77a7752123 Fix potential buffer overflow in Fl_Help_View (#1196) 2025-02-01 19:40:24 +01:00
ManoloFLTK
ab9fd0f503 macOS: add support of showing window to multi-screen fullscreen state 2025-01-30 16:47:57 +01:00
ManoloFLTK
6e922b8005 macOS: Fix "Full screen broken on macOS in FLTK 1.3.10 (regression)" (#1192)
FLTK now supports 2 types of fullscreen modes under macOS:
1) normal macOS fullscreen mode where the menubar and titlebar appear when mouse is moved to top of screen
and the window covers one screen only;
2) multiple-screen mode that requires calling Fl_Window::fullscreen_screens() before.

This commit fixes all possible transitions between these fullscreen modes and normal window mode.
2025-01-30 11:14:17 +01:00
Albrecht Schlosser
18ea5bcb20 Improve documentation of Fl_Box constructors (#1194)
Separate both constructor types and document parameters.
2025-01-29 14:33:07 +01:00
Albrecht Schlosser
5a0551df0a CMake: fix include directories of bundled image libs
If FLTK has been built with bundled image libs the include directory
of the *installed* library headers is 'FL/images' relative to the
normal 'include' directory.

The CMake property "include_directories" is now added to the installed
fltk_images library so it is used when building user programs with
bundled image libs.
2025-01-27 15:51:34 +01:00
ManoloFLTK
6b87b01b65 Refrain static function capture_decorated_window_SCK() from capturing the cursor 2025-01-26 22:45:02 +01:00
ManoloFLTK
00a02fbda9 Same effect as a49b5ea with less lines of code 2025-01-24 15:47:53 +01:00
ManoloFLTK
a49b5ea029 Fix "Wayland: redrawing of a surface may fail if a subsurface is being moved" (#1191)
This commit adds support of scenarios where a child window is moved while its parent is simultaneously modified.
2025-01-24 14:10:18 +01:00
Albrecht Schlosser
0c2aa40bbc Fix Fl_Table_Row inconsistencies, final part (#1187)
Adjust internal vector sizes before and after changing the rows() in
the base class to avoid inconsisten sizes.

Note that the crash reported by the OP of PR #1187 was caused by
more than one issue, not only the one fixed here. Thanks for the
original patch to the author, GitHub user 'basiliscos'.
2025-01-22 21:11:06 +01:00
ManoloFLTK
915ea80f45 Windows: replace "Arial" by "Microsoft Sans Serif" for the FL_HELVETICA font family
Users who need the old behavior for strict backwards compatibility under Windows can load the previous (Arial) font at program startup with only a few lines of code:

#ifdef _WIN32
  // reset Windows fonts to pre-1.4.2 state
  Fl::set_font(FL_HELVETICA,     " Arial");
  Fl::set_font(FL_HELVETICA + 1, "BArial");
  Fl::set_font(FL_HELVETICA + 2, "IArial");
  Fl::set_font(FL_HELVETICA + 3, "PArial");
#endif
2025-01-22 18:44:13 +01:00
ManoloFLTK
2bcfcc332d Remove incorrect use of Fl_Window::current() in Fl_Quartz_Image_Surface_Driver c'tor
Fl_Window::current() can refer to a deleted window is some scenarios
2025-01-22 18:23:39 +01:00
Albrecht Schlosser
bcb679804b fltk-config: reorder include dirs of bundled image libs
1. prepend include dirs of bundled image libs and append Cairo include
   dirs and flags

2. remove forgotten debug statement from previous commit
2025-01-21 16:05:33 +01:00
Albrecht Schlosser
7864ea636d fltk-config: fix "Check bundled image libraries in source tree"
Avoid adding a non-existent folder to include directories (-I)
in `fltk-config --cxxflags` etc.
2025-01-21 15:08:13 +01:00
Albrecht Schlosser
6c3a71181b CMake: check INTERFACE_LINK_LIBRARIES for empty value
This is a safety for consistency. It doesn't really change the result
but avoids "adding" an empty argument to a CMake list.
2025-01-21 14:23:27 +01:00
Albrecht Schlosser
2dd4bdeef7 CMake: make "optional" dependencies 'PUBLIC' (#1173)
On FreeBSD some of the required header files (and libraries) are not
in standard (known) locations, hence they wouldn't be found under
certain circumstances. Making all dependencies 'PUBLIC' adds the
needed include directories and link libraries to all builds.

For details see GitHub Issue #1173 with title
  "FLUID compilation error on FreeBSD when FLTK_BACKEND_X11=ON"
2025-01-20 17:25:11 +01:00
ManoloFLTK
02d416b0b6 Attempt to improve member function Fl_Wayland_Screen_Driver::insertion_point_location()
This makes the IM aware of the cursor movement to the right after having committed text.
2025-01-20 11:25:46 +01:00
ManoloFLTK
2a58560b7d tedst/utf8: Change default font used under Windows for "Unicode Display Test"
The Windows doc at https://learn.microsoft.com/en-us/typography/font-list/arial-unicode-ms
 of the "Arial Unicode MS" font reads
"The font was included with Office but not Windows. …
We stopped servicing and updating Arial Unicode and no longer install it as part of Office."
Using that font is therefore not the best choice.
This commmit uses "Microsoft Sans Serif" instead available in all Windows versions
since Windows 2000.
2025-01-19 18:39:38 +01:00
ManoloFLTK
407567b70e Make Fl_SVG_Graphics_Driver use the C locale when writing float values - cont'd 2025-01-18 17:25:34 +01:00
Albrecht Schlosser
323d525591 MSYS2: Correctly detect ucrt64 environment (PR #1167)
This fix is different than the proposed PR.
The PR will be closed and not merged.

Closes #1167.
2025-01-16 18:14:41 +01:00
Albrecht Schlosser
a6f51105d0 Improve and reorder Fl_Tabs documentation
Note: this also removes the (not working) suggestion to add an invisible
box to an Fl_Scroll-type child of Fl_Tabs.
2025-01-16 15:42:45 +01:00
Albrecht Schlosser
d5461c55a7 Document issues with Fl_Scroll as children of Fl_Tabs (#1175)
Unfortunately this *appears* to be a new constraint caused by the great
new features of Fl_Tabs like overflow handling etc. and fixing drawing
issues in the tab area (since FLTK 1.4).

However, this conflict has already been there in 1.3 but didn't cause
visual artifacts in normal use.
2025-01-15 16:11:15 +01:00
Albrecht Schlosser
546a3168f6 Fix typos in documentation of Fl_Tabs 2025-01-15 16:05:01 +01:00
Albrecht Schlosser
a48ebc5db0 Fix return value of Fl_Table_Row::row_selected(int) (PR #1187)
As discussed in the context of PR #1187 the previous return value '-1'
was misleading and undocumented. The docs mentioned only '1' and '0'.

User code that used the return value as documented (like a `bool`)
would make the wrong decision if the return value was '-1': true
(selected) instead false (out of range).

This commit fixes the code by doing what the docs define and clarifies
the documentation.

Further documentation improvements of Fl_Table (example code used a
method that is not defined in Fl_Table) and of Fl_Table_Row are
included as well.

Doxygen docs of two methods of Fl_Table_Row moved to the .cxx file
where they belong according to the CMP.
2025-01-14 15:21:42 +01:00
ManoloFLTK
06418e4b21 Repair incorrect path in #include directive 2025-01-11 17:49:44 +01:00
ManoloFLTK
45239af178 Make Fl_SVG_Graphics_Driver use the C locale when writing float values 2025-01-11 17:45:36 +01:00
ManoloFLTK
be72c49296 Remove unnecessary #include directive 2025-01-11 17:39:07 +01:00
ManoloFLTK
0f71d63834 Fl_Text_Editor::wrap_mode(Fl_Text_Display::WRAP_AT_BOUNDS, 0) hurts scrolling (#1186) 2025-01-11 15:38:20 +01:00
ManoloFLTK
70fff72e2d Wayland platform: fix handling of key repeats 2025-01-10 16:38:48 +01:00
ManoloFLTK
7bb8bdb1fa Fix Fl_{Wayland|Xlib}_{Copy|Image}_Surface_Driver::set_current()
Member function Fl_Cairo_Graphics_Driver::set_cairo() needs be called only to initialize the driver.
Doing it also later undoes the effect of Fl_Widget_Surface::translate() if used
when Fl_Surface_Device::pop_current() calls the overridden Fl_Surface_Device::set_current().
2025-01-10 08:20:01 +01:00
ManoloFLTK
c0c2cf7d40 Make draw to image and draw to clipboard behave equally in X11 and Wayland 2025-01-08 14:37:57 +01:00
Matthias Melcher
ca786597f7 Add Fl_Valuator destructor.
This is required by Swig to generate code for wrapping
FLTK for Python and potentially other languages. It has
no impact on the API or ABI.
2025-01-03 14:40:59 -06:00
ManoloFLTK
6c7b005a95 Remove duplication and typo in documentation of Fl::copy() 2025-01-02 15:47:35 +01:00
ManoloFLTK
70729e6fdb Document in detail how screen work areas are computed across platforms (#1180) 2024-12-31 17:30:44 +01:00
Matthias Melcher
4ce09ae47a Fluid: Fix file history text. 2024-12-28 17:23:55 -05:00
Matthias Melcher
050cbabdfe Fluid: Rename Stratgy constants to comply with CMP.
Capitalized constants.
Added flag to indicate creation by user or file.
Removed global variable 'reading_file'.
2024-12-27 20:56:10 -05:00
Matthias Melcher
2100655a1b Fix integer overflow in image interpolation. (#73)
Force casting int to long whenever a pixel offset is calculated
as offsets can cross the 2GB border for very large images.
2024-12-26 15:01:58 -05:00
ManoloFLTK
95c66a0488 Wayland: fix a border case in member function Fl_Wayland_Window_Driver::resize() 2024-12-26 16:10:50 +01:00
Albrecht Schlosser
61208e7792 Fix typo in README.CMake.txt 2024-12-26 13:31:06 +01:00
Matthias Melcher
89466c2d37 FLUID: Minor fix and docs. 2024-12-22 11:45:51 -06:00
Matthias Melcher
7d49c02803 FLUID: fix one more warning. 2024-12-21 12:26:20 -06:00
Matthias Melcher
17d300215b FLUID: Remove warnings. 2024-12-21 12:22:13 -06:00
MatthiasWM
4d8a0df312 FLUID: Improve path handling on Windows. 2024-12-21 12:14:31 -06:00
Matthias Melcher
1f25ee82b0 FLUID: Improve filename list in main menu. 2024-12-21 11:22:07 -06:00
Albrecht Schlosser
9f66df51b0 Fix compiler warning [-Wsign-compare] 2024-12-19 17:26:42 +01:00
Matthias Melcher
809dae489d Fix Help View find method (#1119)
The search function now skips '<...>' blocks
more reliably and also finds Unicode HTML entities and
UTF-8 encoded characters.
2024-12-16 23:32:20 +01:00
Matthias Melcher
3293a68c1d Fix possibly uncleared damage flag of Fl_Pack (#1172).
Damage flag `FL_DAMAGE_ALL` is set during Fl_Pack::draw if child
is repositioned. If the child is outside the clipping area, if will not redraw
and the flag will remain set even after Fl_Pack::draw which is not allowed.
2024-12-16 20:30:46 +01:00
ManoloFLTK
c083e5c5fb Fix: Crash on macOS if Escape is pressed while Help submenu is open (#1170) 2024-12-15 16:00:06 +01:00
Albrecht Schlosser
844e58a105 Update makesrcdist: fix packaging bug
The previous version didn't delete the docs before the source files
were packed which resulted in too big release tarballs.

Notes:
 (1) Release 1.4.1 has been updated (files were replaced) so all
     further downloads are not affected.
 (2) The git commits on tag release-1.4.1 do not include this commit
     but this is OK. This will be in the next release.
 (3) makesrcdist itself is not packed in the source tarballs anyway.
2024-12-13 00:16:38 +01:00