Commit Graph

7358 Commits

Author SHA1 Message Date
ManoloFLTK
89f714cb4e Remove platform-specific code from file cp936ext.h 2025-03-07 17:43:03 +01:00
Matthias Melcher
daf20b86af Fixing error where std::string could be assigned NULL' 2025-03-07 15:08:06 +01:00
ManoloFLTK
7f60f019d7 Fix "fltk autotools build does not link against libXft" (#1202)
libXft was erroneously present in the link command when using Pango and Cairo.
This is fixed by disconnecting the GUI scaling code from use of Xft.

This commit also makes sure that when Wayland is used, pkg-config is available
on the build machine. This allows to remove from file CMake/options.cmake
code that was labelled with "FIXME".
2025-03-07 11:06:24 +01:00
Matthias Melcher
6acda521cc Removes the remaining references to Fl_String.
Still to do: rename fl_filename... to fl_filename..._str
and introduce into core library.
2025-03-07 01:15:57 +01:00
Matthias Melcher
063ff67fcd Fixing a couple of warnings. 2025-03-07 00:59:25 +01:00
Matthias Melcher
e8060f2a61 One more FL_String::apend fix, 2025-03-07 00:51:20 +01:00
Matthias Melcher
9cfd932d3a Replce Fl_String in Fluid with std::string.
Also fix for Linux.
2025-03-07 00:48:18 +01:00
Matthias Melcher
3068c7a0af Fl_String is now just an alias for std::string.
All mentions of Fl_String will be replaced with std::string
and the Fl_String implementation will be removed.
2025-03-07 00:12:40 +01:00
Albrecht Schlosser
dc07f927f1 Fl_Group: convert array of children to std::vector
Note: this is only a hidden implementation detail: all concerned
variables are private, and the code is simplified (less error prone).

Size of Fl_Group on 64-bit Linux: 168 -> 176 Bytes (+8 Bytes).

test/group.cxx: test for Fl_Group::{add, insert, remove} etc.
2025-03-06 18:31:31 +01:00
Albrecht Schlosser
191b33e0de Update version numbers to 1.5.0 2025-03-06 18:16:03 +01:00
Albrecht Schlosser
e2ca1a39c8 Remove autotools (configure/make) support 2025-03-06 17:12:52 +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
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
ManoloFLTK
d5612afd61 Fix "Fl_JPEG_Image infinite longjmp loop on Mac release builds" (#1207) 2025-02-20 23:16:17 +01:00
ManoloFLTK
81a5736006 Make Fl_Cocoa_Gl_Window_Driver::capture_gl_rectangle() return a depth-4 image
This change allows to capture the rounded corners of a top-level GL window.

Also, rename Fl_Cocoa_Window_Driver::capture_decorated_window_10_5()
from capture_decorated_window_10_6() because this function uses
CGWindowListCreateImageFromArray() available from macOS 10.5.
2025-02-08 17:19:07 +01:00
ManoloFLTK
9afb35f3a6 fix macOS Sonoma/Sequoia not capturing OpenGL text on macOS - cont'd (#1197 2025-02-06 14:39:54 +01:00
ManoloFLTK
d60141bb71 fix "macOS Sonoma/Sequoia not capturing OpenGL 1 text on macOS" (#1197) 2025-02-06 12:25:39 +01:00
ManoloFLTK
c92bf829b4 macOS: restore building with SDK versions between 10.7 and 10.11 2025-02-05 18:53:55 +01:00
Albrecht Schlosser
904039c4c6 Fix typos and trailing whitespace
Also replace 'MSWindows' with 'Windows' where appropriate, leaving
only old documents like README files from 1.3 and older as-is.
2025-02-05 12:34:39 +01:00
ManoloFLTK
89d146ecee macOS: fix when fullscreen window looses and regains focus with SDK 10.6 (#1192) 2025-02-04 17:30:35 +01:00
ManoloFLTK
02f431bd88 macOS: Restore fullscreen window mode when using SDK < 10.7 (#1192) 2025-02-03 15:25:05 +01:00
ManoloFLTK
94f471b701 macOS: fix transition from single-screen fullscreen to "All Screens" fullscreen 2025-02-03 12:08:20 +01:00
ManoloFLTK
bc764dabc1 Avoid code repetitions among Fl_{X11_}Window_Driver::{un_}maximize() functions 2025-02-03 09:34:19 +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
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
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
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
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