Commit Graph

7555 Commits

Author SHA1 Message Date
Matthias Melcher
67d67fbbfd Fix two macOS compiler warnings. 2025-11-17 22:22:12 +01:00
Greg Ercolano
bd945bf647 smoother scrolling in Fl_Terminal 2025-11-17 12:48:44 -08:00
Matthias Melcher
fa65cd6321
Add pen/stylus/tablet API and driver for macOS (#1326)
* define the pen/tablet support API
* add pen event handler stub as a fallback
* add pen device test "penpal".
* Add macOS pen/stylus/tablet driver.
* Add Oxygen documentation.
2025-11-17 21:10:01 +01:00
Albrecht Schlosser
d623ad08a9 Fix Cairo build and add FLTK_OPTION_CAIRO_WINDOW to CI build
... on GitHub (GitLab CI builds used it already)
2025-11-17 13:53:24 +01:00
Matthias Melcher
646bd55764
Refactor large static class Fl into an expandable namespace Fl (#1325)
* Change class Fl into namespace Fl.
* Untangle Fl namespace into themed headers.
* cut line count of FL/Fl.H in half
* FL/core subdirectory now holds short headers 
  grouped by functionality.
2025-11-16 01:58:54 +01:00
Albrecht Schlosser
6a0edd15c5 Revert/fix a0654b59ac: FLTK_CONSOLIDATE_MOTION = OFF
In commit a0654b59ac all assignments to
variable `fl_xmousewin` were erroneously put under control of macro
FLTK_CONSOLIDATE_MOTION. This commit reverts this.

The correct fix would have been to declare

  extern Fl_Window *fl_xmousewin;

unconditionally which was eventually done in a later commit.

The related variable `static Fl_Window *send_motion;` is still used
under control of macro FLTK_CONSOLIDATE_MOTION.
2025-11-13 15:38:22 +01:00
ManoloFLTK
c6f34560b0 Wayland: fix computation of screen workarea size.
This computation has been found possible only for single-display settings.
2025-11-10 17:33:53 +01:00
Albrecht Schlosser
054fc9c823 Declare some methods of Fl_Window 'const'
These Fl_Window methods are 'const' but had not been declared 'const':

- uchar get_size_range(...) const
- int shown() const
- const Fl_Image *shape() const
- int screen_num() const
- fl_uintptr_t os_id() const
2025-11-10 16:23:04 +01:00
ManoloFLTK
733511af41 Remove warnings when building Doxygen documentation. 2025-11-09 14:37:07 +01:00
Matthias Melcher
d12d16f6ab Fix documentation of fl_filename_ext 2025-11-09 13:09:46 +01:00
ManoloFLTK
c12105193c Complete documentation of function fl_open_callback(). 2025-11-09 11:01:13 +01:00
ManoloFLTK
fd14a3abf0 Wayland: simpler computation of screen workarea size 2025-11-08 16:43:36 +01:00
ManoloFLTK
87f9a6f4d6 Wayland: fix computation of screen size and workarea
The previous method failed with gnome 49.1
2025-11-06 11:23:00 +01:00
ManoloFLTK
d8df24a2ea Fix "Long Tooltips can crash under Wayland" (#1317) 2025-11-05 21:10:18 +01:00
ManoloFLTK
f2db90cb77 Fix "CMake: Fallback to libOpenGL (no-X11 OpenGL)" (#1251) 2025-11-02 15:13:29 +01:00
Matthias Melcher
a128b7c95a Fix UTF-8 documentation'
Fix Unicode buffer allocation
2025-11-01 21:23:18 +01:00
Matthias Melcher
ccbb424046 Add option to uniform line drawing in scaled mode (#167) 2025-11-01 14:33:06 +01:00
Matthias Melcher
418689548f Add more Unicode documentation (2/2) (#125) 2025-11-01 02:12:32 +01:00
Matthias Melcher
2d33e5b90c Improve docs for UTF-8 calls (1/2)(#125) 2025-11-01 01:37:31 +01:00
Matthias Melcher
0ac7e427a1 Avoid crash in Fl_Gl_Window::make_current() (#1287) 2025-10-31 20:37:24 +01:00
Matthias Melcher
7500b3c540 Add information on Fl_Widget::type_. 2025-10-29 11:51:06 +01:00
ManoloFLTK
445e96f5bb Cont'd "New Wayland subwindow code creates issues with resizes of opengl windows…" (#1311) 2025-10-27 09:33:10 +01:00
ManoloFLTK
efac0cb9ab Fix "New Wayland subwindow code creates issues with resizes of opengl windows…" (#1311) 2025-10-20 15:09:52 +02:00
Greg Ercolano
3ee58d2820 Doc fix for issue #1310 2025-10-09 11:29:46 -07:00
ManoloFLTK
a24bb896c5 Simplify and improve function Fl_Wayland_Window_Driver::resize() (#1307)
This modified implementation improves support of subwindows that are moved or resized
above their parent toplevel window. It also significantly shortens and clarifies the source code.
2025-09-30 12:00:18 +02:00
ManoloFLTK
1d44c0ebae Wayland: improve support of draggable subwindow (related to #1307) 2025-09-25 14:43:23 +02:00
ManoloFLTK
b7e52bb03c Underline does not appear in some fonts and scales (Windows,X11-noCairo) (#1308) 2025-09-19 11:10:52 +02:00
ManoloFLTK
9b56da5753 Underline does not appear in some fonts and scales (X11-noCairo) (#1308) 2025-09-19 10:52:07 +02:00
ManoloFLTK
6160673bbf Fix: Underline does not appear in some fonts and scales (WinXP .. Win11) (#1308) 2025-09-17 17:07:45 +02:00
ManoloFLTK
a8244ebcd8 Complete Wayland-related part of issue #1295 - continued 2025-09-15 09:13:45 +02:00
ManoloFLTK
dfd208e171 Complete Wayland-related part of issue #1295 2025-09-15 09:05:16 +02:00
ManoloFLTK
e2049c708b Add Doxygen conditional operator to remove warnings about missing references 2025-09-09 10:04:55 +02:00
ManoloFLTK
b69286f2ca Remove deprecation warning of graphicsContextWithWindow used with macOS ≤ 10.13 2025-09-08 12:44:55 +02:00
Albrecht Schlosser
1182cd66ec Make Fl_Table::get_selection() 'const' (#1305)
See also branch-1.4 with FLTK_ABI_VERSION >= 10405:
  commit 9b9426bf6e
2025-09-05 17:38:05 +02:00
ManoloFLTK
8472df82d0 Remove use of deprecated member function Fl_Menu_Item::setonly() 2025-09-05 09:25:59 +02:00
ManoloFLTK
93fae41fc2 Fix "Focus event lost if opening window on macOS" (#1300) 2025-09-03 09:00:34 +02:00
ManoloFLTK
5830c72b58 Restore use of menubar at top of fullscreen window under X11 2025-08-31 16:14:50 +02:00
ManoloFLTK
1a576d43b3 Wayland: account for new Wayfire compositor - cont'd
And allow for vertical display taskbar.
2025-08-29 12:21:15 +02:00
ManoloFLTK
fa1d09b106 Fix "Wayland libdecor crashes with built-in one." (#1299) 2025-08-25 16:24:17 +02:00
ManoloFLTK
3cf9390e9e Wayland: stop calling non-public libdecor_frame_get_content_{width,height} (#1296) 2025-08-20 08:59:41 +02:00
ManoloFLTK
db94990c1f Fix for Wayland only part of #1295 related to "mangled" events 2025-08-19 14:08:00 +02:00
ManoloFLTK
e42666ba68 Fix part of #1295 related to Wayland and hiding/showing subwindow 2025-08-19 10:22:52 +02:00
ManoloFLTK
05e37453de Fix: Unexpected FL_ENTER after FL_LEAVE when a subwindow is hidden (#1295) 2025-08-18 16:07:59 +02:00
ManoloFLTK
679f89bb7a Restore building for OpenBSD 2025-08-12 19:35:27 +02:00
ManoloFLTK
0ef2d6587d Remove last use of non-portable strdup() function 2025-08-12 08:53:01 +02:00
ManoloFLTK
e082a42f20 Wayland: Some shortcut keys not delivered when input widget has focus - cont'd (#1290) 2025-08-09 11:06:23 +02:00
ManoloFLTK
36b9a990fe Wayland: Some shortcut keys not delivered when input widget has focus (#1290) 2025-08-08 18:13:43 +02:00
ManoloFLTK
0e6c61e6fc Wayland: avoid NULL-pointer error after call to wl_display_get_protocol_error() 2025-08-07 19:37:05 +02:00
ManoloFLTK
05c678d9e6 Fix "Fl_Double_Window::make_current() issues with Cairo" - cont'd (#1285) 2025-08-06 16:20:27 +02:00
ManoloFLTK
11f4b5a992 Fix "Fl_Double_Window::make_current() issues with Cairo drawing" (#1285) 2025-08-05 10:14:07 +02:00
ManoloFLTK
8bcf65fa66 Fix issue under Wayland when erasing overlay rectangle (#1285) 2025-08-05 07:38:57 +02:00
ManoloFLTK
5becf68c18 Fix "Callback or event on minimize of the main window " for Wayland (#1288) 2025-08-04 15:54:14 +02:00
ManoloFLTK
50184f9946 Fix "Callback or event on minimize of the main window" for X11 platform (#1288) 2025-08-03 09:03:12 +02:00
Albrecht Schlosser
87e299e776 Update documentation (typos and minor corrections) 2025-07-26 13:44:41 +02:00
Albrecht Schlosser
b00ae1eee4 Fix documentation of fl_overlay_clear and fl_overlay_rect
The code example in fl_overlay_clear() wouldn't work.
2025-07-24 15:40:18 +02:00
MatthiasWM
890f538bb5 Generate better FL_LEAVE coordinates on Windows (#87)
Use the current mouse position to estimate the
position where the mouse left the window. Not
perfect, but much better than repeating the last
move coordinates.
2025-07-16 17:39:07 +02:00
ManoloFLTK
86f2904858 Remove warnings triggered by -Wredundant-decls (#1277) 2025-07-16 15:13:14 +02:00
ManoloFLTK
e444371b18 Fix: Redundant redeclaration of Fl_Shortcut fl_old_shortcut(const char*) (#1277) 2025-07-15 07:21:44 +02:00
ManoloFLTK
e581f50e9a Wayland: account for new Wayfire compositor - cont'd 2025-07-10 08:18:35 +02:00
ManoloFLTK
83565dd880 Wayland: account for new Wayfire compositor 2025-07-09 16:51:17 +02:00
Matthias Melcher
5a574e8d9d Improve Fl_Button event handling documentation (#1267) 2025-07-09 11:42:33 +02:00
Albrecht Schlosser
5d68428a00 Fix trailing whitespace and convert a few tabs to spaces
... according to CMP
2025-07-08 15:25:14 +02:00
Matthias Melcher
2803f70f58 #1114: Ensure minimum height of last block in Fl_Help_View 2025-07-08 15:19:21 +02:00
Matthias Melcher
5c33d3051f Fl_Help_View: Subclassing minor comment chages 2025-07-07 15:47:00 +02:00
Albrecht Schlosser
bdde3e5d2b Fl_Table_Row: replace private class CharVector with std::vector
FL/Fl_Table_Row.H: use `std::vector<uint8_t> _rowselect;`,
  remove declaration of class `CharVector`

src/Fl_Table_Row.cxx: remove implementation of class `CharVector`,
  simplify loops (use range based for loops),
  use resize() to change vector size.

Unify copyright year of Fl_Table* headers and implementation.
2025-07-07 14:55:55 +02:00
Albrecht Schlosser
51cca24d04 Add missing and remove unnecessary #include statements
Note: if user code requires a header, then user code must #include it.
2025-07-07 11:58:49 +02:00
Matthias Melcher
e12c42a0cd Fl_Help_View: Revert some changes 2025-07-05 19:47:03 +02:00
Matthias Melcher
ccc294f9f7 Fl_Help_View: Thin out header file
- remove unnecessary include.
2025-07-05 17:48:30 +02:00
Matthias Melcher
5fb38897b7 Fl_Help_View: Refactor to use PIMPL
- using a Pointer to Implementation instead of having
a huge Fl_Help_View class. This improves build speed
(smaller header fiel) and allows us to fix the
implementation while keeping the ABI unchanged.
2025-07-05 17:35:41 +02:00
Matthias Melcher
fa22585bbb Fl_Help_View: Fix writing into empty std::string 2025-07-05 17:28:45 +02:00
Matthias Melcher
3b32463dc9 Fl_Help_View: Improve comment 2025-07-05 16:03:14 +02:00
Matthias Melcher
5d9961c1c3 Fl_Help_View: Finl formatting and documentation
- restructure header file
- sort source file reflecting header
- documentation of text selection
2025-07-05 15:25:11 +02:00
Matthias Melcher
d3c6135c08 Fl_Help_View: Improve selection
- users can now select text in multiple Help Views
- users can now select text that is also a link
- selections draws dimmed if not focused
2025-07-05 13:42:28 +02:00
Matthias Melcher
53665045d3 Fl_Help_View: Changes some more formatting
- streamlines callbacks
- removes unused function
- header file not finished yet!
2025-07-04 16:31:59 +02:00
Albrecht Schlosser
d5220370b1 Remove private class Fl_Int_Vector
This class was used in pre-C++11 versions (up to 1.4.x) and is no
longer needed.
2025-07-03 22:37:49 +02:00
Matthias Melcher
4e1450d750 Fl_Help_View: Refactoring static sizes
- replaced Fl_Int_Vector with std::vector<int>
- removed static buffers in path arrangement methods
- NULL to nullptr
2025-07-03 19:58:56 +02:00
Matthias Melcher
f0fa9fc8f8 Fl_Help_View: Improve formatting and Doxygen comments 2025-07-03 13:55:29 +02:00
Matthias Melcher
872e2b8fb6 Fl_Help_View: Refactor more strings and dynamic lists. 2025-07-03 00:39:53 +02:00
Matthias Melcher
5919dbb6af Fl_Help_View: Reformat and comments 2025-07-02 22:59:46 +02:00
Matthias Melcher
69431ef51f Fl_Help_View: Refactor Fl_Help_Link to C++11 2025-07-02 20:45:54 +02:00
Matthias Melcher
e4d43a3951 Help_View: Improve target line management 2025-07-02 17:54:43 +02:00
Albrecht Schlosser
a05ae33e20 Remove deprecated methods and functions
In FLTK 1.5 we remove most (but not all) methods and functions that
were deprecated in FLTK 1.3 or earlier.
2025-07-02 17:19:52 +02:00
Matthias Melcher
5bf1333f07 Set Fl_Menu_Item::setonly() to deprecated
for the version without the starting argument.
2025-07-02 15:42:46 +02:00
Matthias Melcher
66dde26469 Better handling of special case when scaling image
When scaling image down by 2, 4, 8, etc., there is no
sense in calling the bilinear scaling.
2025-07-01 13:22:14 +02:00
Matthias Melcher
42b2388610 Improve bilinear image scaling below 50%
The original code can not scale well below 50%. To improve
filtering in a fast way, huge images are scaled by powers of
two before fine scaling using the original bilinear scale.
2025-06-30 14:56:26 +02:00
MatthiasWM
acd77fa8dc Fix Windows compile error from previous commit. 2025-06-19 17:54:31 +02:00
Matthias Melcher
2a7b3c81c1 Ensure that the 'awake' pipe does not overflow (#1263) 2025-06-19 16:04:56 +02:00
Matthias Melcher
eadea6a992 Update Fl::await() and friends API and documentation
This creates the base for #1263, but does not fix it yet.
2025-06-19 15:33:38 +02:00
ManoloFLTK
3d13dfefa9 Fix in window titlebar capture to support macOS 26 Tahoe 2025-06-11 18:43:03 +02:00
ManoloFLTK
ac294f7348 Fix "Selecting menus from the menubar under Wayland when in fullscreen" (#1264) 2025-06-10 17:03:29 +02:00
Albrecht Schlosser
340caa2dc3 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.
2025-06-06 16:10:35 +02:00
ManoloFLTK
5293beea6f Restore building for Linux w/o cairo and w/o xft 2025-06-05 15:56:09 +02:00
Albrecht Schlosser
7897bbc04f Fix several compiler warnings [-Wextra-semi]
Example:
  warning: extra ‘;’ after in-class function definition [-Wextra-semi]

Also: replace 'FL_OVERRIDE' with 'override' in all modified files
2025-06-05 09:50:07 +02:00
ManoloFLTK
e2683f36d4 macOS: protect uses of __block by #if defined(__BLOCKS__) condition 2025-06-03 18:27:45 +02:00
ManoloFLTK
b371c1185c Add build option FLTK_USE_DBUS to allow build w/o dbus (PR #1252)
Thanks to @lanodan for most of the source code.
2025-06-03 16:19:27 +02:00
ManoloFLTK
85be70efa5 Restore use of build option FLTK_USE_POLL 2025-06-03 08:23:04 +02:00
ManoloFLTK
9a5e3b95b8 Fix for #1260 - part 4: fix when menu button is in subwindow under Wayland 2025-05-30 21:38:13 +02:00
ManoloFLTK
c13594f999 Fix for #1260 - part3: fix exploration of menu button window under Wayland 2025-05-30 17:59:16 +02:00
ManoloFLTK
86a8d138f2 Fix for #1260 - part2: improve position of menu button window under Wayland 2025-05-30 16:44:26 +02:00
ManoloFLTK
ac0a5d52cb Wayland: fix "A flag to set how menus should show up" (#1260) 2025-05-29 17:42:16 +02:00