Commit Graph

7642 Commits

Author SHA1 Message Date
ManoloFLTK
abaa550aea Simplify Fl_X11_Window_Driver::resize() when using cairo graphics. 2026-03-15 10:41:29 +01:00
ManoloFLTK
d8be762283 Fix use of the cairo graphics driver with Fl_Double_Window and the X11 platform (#1370).
FLTK now handles Fl_Double_Window with the cairo graphics driver as with the X11 graphics driver:
- when drawing via the window's draw() method, FLTK draws to the offscreen cairo surface
and then copies the offscreen surface to the screen;
- when drawing outside the draw() method after a call to make_current(), FLTK draws to
a cairo surface associated to the mapped window.
2026-03-15 09:16:18 +01:00
ManoloFLTK
b4f73314a7 Add int return type to Fl::get_mouse(int&, int&) providing the number of mouse-containing screen. 2026-03-13 15:53:52 +01:00
ManoloFLTK
a342d9f3d5 Improve Fl_Window::hotspot() when diverse screens have diverse scale factors. 2026-03-13 14:46:13 +01:00
ManoloFLTK
278e6eef6e Fix issues with Fl_RGB_Image::draw() + window scaling, and performance concerns (#1370) 2026-03-13 09:27:25 +01:00
ManoloFLTK
38cad05357 Improve Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) 2026-03-11 16:36:27 +01:00
ManoloFLTK
a92fbec43a Improve drawing of part of Fl_RGB_Image while scaling display (#1370) 2026-03-10 16:00:34 +01:00
ManoloFLTK
ce7b335d4d Improve control of screen where FLTK positions menu windows (#1376) 2026-03-10 08:33:34 +01:00
ManoloFLTK
527972e7a4 Fix "Window scaling shortcut always moves window towards "initial" display on Windows" (#1371) 2026-03-09 18:42:23 +01:00
ManoloFLTK
43fded082b Menus on Windows appear on wrong position on a 4K display (#1376) 2026-03-09 18:10:08 +01:00
ManoloFLTK
b67d4ef2dd Fix "fl_draw_image() with horizontal flip reads out of bounds" (#1369) 2026-03-09 17:47:59 +01:00
ManoloFLTK
d9a3fb32da Fix macOS crash when drawing image with draw_image() in some scenarios (#1372) 2026-03-09 14:43:59 +01:00
ManoloFLTK
ea27dafe1e Fix "Transparent PNGs not rendered correctly when window is scaled" (#1375) 2026-03-09 12:17:10 +01:00
ManoloFLTK
3d493308ed Fix "Please remove the slight transparency from menu windows on macOS" (#1373) 2026-03-09 11:11:49 +01:00
ManoloFLTK
0010349e05 Remove more code unused since FLTK requires macOS ≥ 10.7 - again 2026-03-04 13:05:55 +01:00
ManoloFLTK
2ff170be23 Remove more code unused since FLTK requires macOS ≥ 10.7 2026-03-04 12:58:05 +01:00
Greg Ercolano
bb1b10a440 Applied xuyun018's fix for Fl_Tree horiz scroll (#1297) 2026-03-03 16:46:50 -08:00
Rodrigo Arias Mallo
e931c21e89 Correct draw translation by 0.5 pixels only
Using 1.5 pixels causes text to be rendered one pixel offset to the top
left. This is visible when text is selected as the characters touch the
top left border.

The fl_text_extents is also updated to make sure the bounding box is
properly placed.
2026-03-03 09:10:58 +01:00
ManoloFLTK
486da9376d Fix "Blurry fonts with cairo/pango on FLTK >= 1.4" (#1365) 2026-03-01 12:22:52 +01:00
Matthias Melcher
97c2a52c7c Fix crash in Fl_Tabs without children (#1366) 2026-02-27 14:18:26 +01:00
ManoloFLTK
47b9156ac7 Restore to commit f2424bf.
There remains a mysterious difference when dropping a file on an app icon
under macOS 26 between an app built with Xcode and one built with CMake.
2026-02-26 11:38:19 +01:00
ManoloFLTK
33f29ae481 Restore correct support of fl_open_callback() under macOS 26 - cont'd 2026-02-25 19:53:07 +01:00
ManoloFLTK
0b88a6c63b Restore correct support of fl_open_callback() under macOS 26 - cont'd 2026-02-25 18:58:01 +01:00
ManoloFLTK
afa7434f0c Restore correct support of fl_open_callback() under macOS 26 2026-02-25 18:01:17 +01:00
ManoloFLTK
f2424bf1fc Further simplification following new minimum supported macOS version: 10.7 - cont'd 2026-02-25 16:55:35 +01:00
ManoloFLTK
1be412ab69 Further simplification following new minimum supported macOS version: 10.7 - cont'd 2026-02-15 15:37:46 +01:00
ManoloFLTK
db18699e95 Further simplification following new minimum supported macOS version: 10.7 2026-02-15 15:27:47 +01:00
Albrecht Schlosser
b9ff72c573 Revert "Prefix user-set window class name" (Windows only)
... introduced in commit 81c965f8e2.

Note: we must not change the xclass (WNDCLASS) set by the user.

Setting another xclass() in FLTK demo programs where the name might
conflict with system WNDCLASS's is the better choice.
2026-02-08 17:44:58 +01:00
Albrecht Schlosser
6cb0ce6615 Add missing FL_EXPORT macro 2026-02-07 20:29:04 +01:00
ManoloFLTK
2521c8a519 X11 platform: Fl::enable_im() crashes without input methods (#1364) 2026-02-06 07:30:39 +01:00
Albrecht Schlosser
54712fd388 Fix compiler warning, rename confusing variable, format code
- fix: comparison of integer expressions of different signedness
- rename confusing variable 'l' to 'len' (l can be confused with 1)
- minor comment and code formatting

This commit should not change the behavior.
2026-02-02 20:07:41 +01:00
Albrecht Schlosser
db4aa25e99 Windows: define required Windows version for Pen/Tablet support
This is necessary for some (not all!) Windows toolchains that
define the required symbols only for Windows 8 and later.
2026-02-02 19:48:41 +01:00
ManoloFLTK
95e5b1b9c5 macOS: remove code present only to support macOS versions 10.6 and earlier - cont'd. 2026-02-02 13:13:11 +01:00
ManoloFLTK
3f56b8091d macOS: remove code present only to support macOS versions 10.6 and earlier.
It's possible to build and run FLTK 1.5 with its use of C++11 for macOS 10.7 and SDK 10.7.
This commit makes 10.7 the required minimal version of macOS to build and run FLTK 1.5.
2026-02-02 12:41:03 +01:00
Albrecht Schlosser
26387c3538 Fix obvious indenting errors after removal of old code
... by commit e0405d2135
2026-02-01 18:17:13 +01:00
ManoloFLTK
e0405d2135 macOS: remove code present only to support macOS versions 10.3 and 10.4.
This is a first step towards removing the code related to support of old macOS versions
that are not compatible with C++11 which FLTK 1.5 requires.
2026-02-01 16:32:21 +01:00
ManoloFLTK
4be596a306 Restore usability with macOS SDK < 10.12 2026-02-01 15:28:59 +01:00
ManoloFLTK
6406437830 Improve documentation of functions dedicated to processing of emoji sequences. 2026-02-01 15:28:06 +01:00
ManoloFLTK
38aaabb059 Avoid leaving file descriptor open after failed call to mkstemp() 2026-02-01 15:28:06 +01:00
ManoloFLTK
8c8bc16905 Fix in Fl_Text_Buffer::next_char() necessary for empty buffer. 2026-01-30 09:04:24 +01:00
ManoloFLTK
4a81cfac9c Wayland paste and DnD: fix minor issue revealed by valgrind - cont'd. 2026-01-30 09:02:56 +01:00
ManoloFLTK
4c5b1df4c8 Emoji support: fix in Fl_Text_Buffer::next_char() necessary for keycap emoji sequences. 2026-01-30 08:37:05 +01:00
ManoloFLTK
6678458b41 Wayland paste and DnD: fix minor issue revealed by valgrind. 2026-01-30 08:33:16 +01:00
Albrecht Schlosser
e9966b7e31 CMake: add try_compile() to figure out if Pen/Tablet is supported
This test is specifically intended to disable Pen/Tablet support on
classic MinGW (32-bit) platforms that lack required symbol definitions
although Pen/Tablet support might be supported by the Windows system.

This test can be extended for other platforms, but for now it's
performed only on Windows.
2026-01-29 17:43:21 +01:00
ManoloFLTK
bed38ba3f5 Emojis: add support of keycap emoji sequences.
- It is expected that all emojis listed in the Wikipedia "emoji" article
as of early 2026 are recognized as single glyphs by FLTK text widgets.
- Document functions fl_utf8_{next|previous}_composed_char()
relatively to the notion of "emoji sequence".
- Remove signed/unsigned comparison compilation warnings.
2026-01-29 13:04:35 +01:00
ManoloFLTK
445d26bb71 Improve usage of std::map::key_comp() member in fl_wayland_clipboard_dnd.cxx 2026-01-28 16:31:36 +01:00
ManoloFLTK
149bc2ca3b Improve usage of std::map objects in fl_wayland_clipboard_dnd.cxx 2026-01-28 16:21:22 +01:00
ManoloFLTK
d74b342141 Fix typo in documentation of fl_utf8len1(). 2026-01-28 12:52:42 +01:00
ManoloFLTK
37aeed359a Wayland: improve handling of priorities between diverse clipboard mime-types. 2026-01-27 16:21:36 +01:00
ManoloFLTK
1a285f43ec Modify fl_utf8toa() to make it account for composed emojis. 2026-01-26 15:40:35 +01:00