Commit Graph

12005 Commits

Author SHA1 Message Date
ManoloFLTK
b0e53f4fcd Wayland: use UTF8 text from clipboard when available. 2026-01-24 09:02:25 +01:00
ManoloFLTK
aea091ca99 Fix "Setting window custom cursor from SVG image crashes" (#1363) 2026-01-22 14:38:49 +01:00
ManoloFLTK
211d42049d Improve handling of text containing context-dependent unicode points.
This commit makes platforms Windows and macOS compute string widths
with the same mechanism as what is in place for platforms Wayland/X11:
- the width of a string containing a single codepoint is computed and
memorized in the table of character widths;
- the width of a string containing several codepoints is computed as
such rather than as the sum of the widths of its composing characters.

This commit also fixes how text input under Windows is processed
when a character needs encoding as a surrogate.

The result is that FLTK text widgets input and draw correctly also
complex emojis encoded with context-dependent codepoints.
2026-01-21 15:47:59 +01:00
ManoloFLTK
d9cc1e555b Restore emojis support under recent macOS versions - cont'd (#1360) 2026-01-16 12:43:23 +01:00
ManoloFLTK
d4d1af2f73 Restore emojis support under recent macOS versions (#1360) 2026-01-12 17:57:19 +01:00
ManoloFLTK
8f7b72f34b Fix "Drawing to the wrong window with cairo and X11" (#1358) 2026-01-12 10:00:55 +01:00
ManoloFLTK
07cce04aa1 Fix "Wayland: NULL pointer dereference in Fl::cairo_make_current()" (#1359) 2026-01-11 16:55:56 +01:00
Albrecht Schlosser
82399ebe4b Clarify that a font must be loaded before measuring text (#1356)
Documentation only: users must load a font with fl_font(face, size)
before measuring text with methods like fl_measure(), fl_height(),
fl_width(), fl_text_extents() etc.
2026-01-03 13:58:56 +01:00
ManoloFLTK
3c6ec861ab Add that FLTK 1.3 supports also Windows 11. 2025-12-30 07:59:06 +01:00
ManoloFLTK
12b6702394 Windows: Fix "If app appears on non-active screen …, window resizes" (#259) 2025-12-16 12:16:02 +01:00
Matthias Melcher
c5b0c2e37f Fix menu crash dereferencing nullptr (#1335) 2025-11-30 00:41:54 +01:00
Greg Ercolano
6a910ec169 Improved clip handling/fix box() 2025-11-18 05:24:46 -08:00
Greg Ercolano
6a0184262d Fl_Terminal fixes from 1.5.x - smoother scrolling and issue #1328 2025-11-17 14:04:55 -08:00
ManoloFLTK
1e769f44b4 Fix "Long Tooltips can crash under Wayland" (#1317) 2025-11-06 00:14:10 +01:00
ManoloFLTK
dd0417885e Cont'd "New Wayland subwindow code creates issues with resizes of opengl windows…" (#1311) 2025-10-27 09:55:13 +01:00
ManoloFLTK
d765037d2c Fix "New Wayland subwindow code creates issues with resizes of opengl windows…" (#1311) 2025-10-20 18:47:41 +02:00
ManoloFLTK
e23a6bd476 Simplify and improve function Fl_Wayland_Window_Driver::resize() (#1307) 2025-09-30 17:06:42 +02:00
ManoloFLTK
cd120b3ffb Underline does not appear in some fonts and scales (Windows,X11-noCairo) (#1308) 2025-09-19 11:29:07 +02:00
ManoloFLTK
2705990eab Fix: Underline does not appear in some fonts and scales (WinXP .. Win11) (#1308) 2025-09-18 08:56:52 +02:00
Albrecht Schlosser
9b9426bf6e Make Fl_Table::get_selection() 'const' (#1305) 2025-09-05 17:28:59 +02:00
ManoloFLTK
c223f99f71 Restore use of menubar at top of fullscreen window under X11 2025-08-31 16:27:06 +02:00
ManoloFLTK
d3bdc69990 Wayland: stop calling non-public libdecor_frame_get_content_{width,height} (#1296) 2025-08-20 09:25:22 +02:00
ManoloFLTK
3f8d1307fd Wayland: Some shortcut keys not delivered when input widget has focus (#1290) 2025-08-09 12:39:24 +02:00
ManoloFLTK
767e159ca2 Wayland: avoid NULL-pointer error after call to wl_display_get_protocol_error()
Backported from master: 0e6c61e6fc
2025-08-07 21:30:50 +02:00
ManoloFLTK
3b6c45125c Fix "Fl_Double_Window::make_current() issues with Cairo drawing" (#1285) 2025-08-07 09:43:22 +02:00
Albrecht Schlosser
d3af349f88 Fix documentation of fl_overlay_clear and fl_overlay_rect
The code example in fl_overlay_clear() wouldn't work.

Backported from: b00ae1eee4
2025-07-24 15:42:19 +02:00
Albrecht Schlosser
9c70ea95a1 Update CHANGES.txt for release 1.4.4 2025-07-19 18:45:10 +02:00
Matthias Melcher
c730902f84 Backport 5a574e8
Improve Fl_Button event handling documentation (#1267)
2025-07-16 12:49:12 +02:00
Matthias Melcher
7884d55c1a Backport 2803f70
#1114: Ensure minimum height of last block in Fl_Help_View
2025-07-16 12:47:40 +02:00
Matthias Melcher
fafdd5df05 Backport d3dca07
#146: Add access to scrollbars widget in Fl_Help_View

- new methods are Fl_Help_View::scrollbar()
and  Fl_Help_View::hscrollbar(), taking inspiration from
Fl_Browser.
2025-07-16 12:45:10 +02:00
Matthias Melcher
bced31e972 Backport c28237d
Set default DPI to 300 in fl_write_png

Previously, the DPI value was completely random, resulting
in some interesting scaling when reading the png in other apps.
2025-07-16 11:53:50 +02:00
Matthias Melcher
72b084c6ac Backport 74b0dc7
Fix address sanitizer exception for macOS native file chooser

The `memcmp` call would crash in Adress sanitizer if the memory compare
would run into an undefined buffer. `memcmp` is not guaranteed to stop
reading a buffer if a difference is found.
2025-07-16 11:50:35 +02:00
ManoloFLTK
6a8949ef21 Fix in window titlebar capture to support macOS 26 Tahoe 2025-07-16 10:44:48 +02:00
Albrecht Schlosser
71d1b7c472 Fix doxygen warnings and improve documentation
1. src/Fl_add_idle.cxx: add missing parameter docs,
   backport documentation of several functions from 1.5

2. FL/fl_draw.H: rename 1st parameter of fl_draw_pixmap(...) from
   'data' to 'cdata'.

Backported from 3114ef0e2f
2025-07-15 19:19:00 +02:00
Albrecht Schlosser
5e7f0357fb Fix compiler warning [-Wundef]
warning: "_WIN32" is not defined, evaluates to 0 [-Wundef]

Manually backported from master (FLTK 1.5):
commit 2d2f474794
2025-07-15 18:50:42 +02:00
Albrecht Schlosser
3e436588e5 Update version numbers for release 1.4.4, update README.txt
- change version numbers to 1.4.4
- update README.txt
- fix trailing whitespace
- update dependencies

Todo: update CHANGES.txt before release.
2025-07-15 16:57:44 +02:00
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