Commit Graph

11994 Commits

Author SHA1 Message Date
Albrecht Schlosser
1f715f8766 Update fltk-config.in (minor comment changes only) 2025-03-27 16:14:29 +01:00
Albrecht Schlosser
6db6a9d8b8 Remove reference to 'configure' from comment
Explain details of the mentioned 'hack' referring to and citing
parts of the original commit log.
2025-03-27 15:04:55 +01:00
Albrecht Schlosser
8424af743b Disallow in-source builds
Rationale:

1. Building in-source creates a lot of untracked files in the source
   tree. We need to take care not to commit any of them, hence we
   have to maintain .gitignore files in several directories.

2. Tests reveal that there are even files in git that are modified
   in the source tree when building docs etc. which means e.g.
   that builds can't be "repeated" after upgrading the sources, and
   that those files could be committed by accident. To avoid this
   we'd have to reorganize the build procedure and make it even more
   complex rather than simplifying it.

3. With autoconf/configure/make we didn't have a choice, i.e. we had
   to allow in-source builds with configure/Makefiles anyway. This
   is no longer true since we removed configure/make support.

Note, todo: if this commit doesn't introduce unexpected issues, then
   we can remove a lot of stuff from the .gitignore files, but this
   is left for a later commit.
2025-03-25 18:55:21 +01:00
ManoloFLTK
d756076644 Fix: Windows: Clipboard gets stuck when text is copied while window is hidden (#1233) 2025-03-25 17:31:25 +01:00
Matthias Melcher
de3b521f11 Upadate macOS README. 2025-03-24 11:26:34 +01:00
Albrecht Schlosser
80c73b508c Fluid documentation: fix image name "main_window.png"
Remove prefix "Fluid." from generated image name.
2025-03-23 15:04:40 +01:00
ManoloFLTK
4b7cea676b Update bundled libdecor to last upstream version (9 mar 2025) 2025-03-19 15:20:48 +01:00
Albrecht Schlosser
1ccafa83b2 Remove obsolete build option 'FLTK_OPTION_STD'
This option is no longer needed since FLTK 1.5 always requires C++11.
2025-03-19 14:44:16 +01:00
ManoloFLTK
4b07ab391a Fix "FLTK apps broken under LabWC compositor" (#1231) 2025-03-19 14:09:57 +01:00
Albrecht Schlosser
5b648d2cfc Fix out-of-bounds access in test/checkers.cxx
For details please see description in the source code in
  test/checkers.cxx lines 620++

This commit also disables unused code: function dumpnode() which is
  used only in VT100 mode.
2025-03-18 20:31:48 +01:00
ManoloFLTK
3f4712957c Wayland: improve support of screen removal while FLTK runs 2025-03-18 18:17:49 +01:00
ManoloFLTK
622c1f1db8 Wayland: fix unsetting fullscreen state for window created fullscreen
In some multi-screen settings, the un-fullscreened window would leave its screen
but would not enter any screen.
2025-03-18 18:09:23 +01:00
ManoloFLTK
c2a4e2ca5c Fix "Inconsistent FL_FULLSCREEN when creating full-screen window" (#1225)
The commit has all platforms send the FL_FULLSCREEN event when a window is created fullscreen.
2025-03-18 16:59:48 +01:00
ManoloFLTK
d4efb77660 Fix "X11 library missing in fltk-config" (#1228) 2025-03-18 15:53:31 +01:00
Albrecht Schlosser
5fcca347c6 Fix comparison that's always true
... because base_dir[0] and dest_dir[0] are *signed* chars.
2025-03-17 20:28:47 +01:00
Albrecht Schlosser
719fed2b13 Windows: fix "heap-use-after-free" in home_directory_name()
Calling getenv() twice with different output vars and accessing both
later could cause "heap-use-after-free" error in some Windows versions.
The result of home_directory_name() would be unpredictable.

Found using Wine and/or MSYS2/clang/libc++ with Address Sanitizer.
2025-03-17 20:16:57 +01:00
ManoloFLTK
6b9fb46b96 Wayland: improve support of addition/removal of displays while FLTK runs 2025-03-17 14:49:17 +01:00
ManoloFLTK
ed4fded9d9 Wayland: compute work area size under MUTTER or when single display 2025-03-17 14:49:17 +01:00
Matthias Melcher
51a55bc736
Fluid: restructuring and rejuvenation of the source code.
* Add classes for application and project
* Removed all globals from Fluid.h
* Extracting args and project history into their own classes
* Moving globals into Application class
* Initialize values inside headers for some classes.
* Undo functionality wrapped in a class inside Project.
* File reader and writer are now linked to a project.
* Avoid global project access
* Nodes (former Types) will be managed by a new Tree class.
* Removed static members (hidden globals) form Node/Fl_Type.
* Adding Tree iterator.
* Use nullptr instead of 0, NULL, or 0L
* Renamed Fl_..._Type to ..._Node, FL_OVERRIDE -> override
* Renaming ..._type to ...::prototype
* Splitting Widget Panel into multiple files.
* Moved callback code into widget panel file.
* Cleaning up Fluid_Image -> Image_asset
* Moving Fd_Snap_Action into new namespace fld::app::Snap_Action etc.
* Moved mergeback into proj folder.
* `enum ID` is now `enum class Type`.
2025-03-16 17:16:12 -04:00
Albrecht Schlosser
13a7073a1e Fix font termination bug from 2e1730d2f0 (#1221)
See also #1223, and thanks to Gonzalo for finding it.
2025-03-16 16:21:55 +01:00
Albrecht Schlosser
b252e5e45c Remove libfltk_cairo (fltk::cairo)
This library is no longer needed and was "empty" for backwards
compatibility since FLTK 1.4.0.
2025-03-16 00:10:53 +01:00
Albrecht Schlosser
2e1730d2f0 Fix potential buffer overflow on Windows when loading fonts (#1221)
This commit is bigger than necessary to fix the buffer allocation but
it also prevents some unnecessary string copies: the font name is
converted from UTF-16 to UTF-8 directly in the buffer used later.

Code reformatted and clarified as well, some duplicated code was
removed.
2025-03-15 21:22:21 +01:00
ManoloFLTK
24aec69f27 Wayland: simplify handling of tall menu windows 2025-03-14 13:04:31 +01:00
Albrecht Schlosser
c18c39071a CMake: improve setting C++ standard and configuration summary
CMake/fl_add_library.cmake: set target_compile_features(.. cxx_std_NN)
  which is inherited by consumers of the library.
  This prevents CMake user projects from failing if they would
  otherwise compile with an older C++ standard.

CMake/fl_debug_var.cmake: add INTERFACE_COMPILE_FEATURES to fl_debug_target()

CMake/fl_summary.cmake: update summary format for longer variable names

CMakeLists.txt:
  - check CMAKE_CXX_STANDARD given by the user (commandline)
    and set C++ standard related CMake variables in the CMake cache.
    The latter is experimental: setting in the cache may be reverted.
  - add C++ standard related info to configure summary.
2025-03-13 18:46:02 +01:00
ManoloFLTK
2d9cf4d83e Improve support of screen addition/removal while FLTK runs 2025-03-13 15:00:21 +01:00
ManoloFLTK
8ff7895f0e Restore support of the sway compositor destroyed by 9b5d40a 2025-03-12 18:26:55 +01:00
ManoloFLTK
5d09e5360d Under KDE V6 and Wayland, handling of taller-than-display menu windows fails (#1216) 2025-03-12 16:43:36 +01:00
ManoloFLTK
9b5d40ad97 Fix "Wayland: Huge menu hiding unexpectedly when moving a mouse (#1115)
This commit also computes work-area size for single-display settings.
2025-03-11 23:47:39 +01:00
ManoloFLTK
1054e81504 CI for Wayland: replace libgtk-3-dev by libdecor-0-dev libxfixes-dev libxcursor-dev libxinerama-dev 2025-03-11 23:47:39 +01:00
Albrecht Schlosser
9ec52336d8 Update README.md for FLTK 1.5
This is the main README file on GitHub. It is similar to README.txt
but doesn't contain every detail to keep it somewhat shorter but
still informative.

The "badges" at the end show details about GitHub Actions (CI).
2025-03-10 19:21:11 +01:00
Albrecht Schlosser
f99fdcdc71 Fix fluid documentation generation
std::string doesn't allow nullptr as input string
2025-03-10 18:15:21 +01:00
Albrecht Schlosser
8838e976a0 More (mostly) documentation updates for FLTK 1.5.0
All files: remove autoconf/configure related stuff, update links.

- README.txt: describe prerequisites, provide generic instructions
  on how to use CMake to build FLTK
- test/demo.cxx: remove code used for configure/make build
- test/CMakeLists.txt: remove obsolete 'target_compile_definitions()'
2025-03-10 15:43:12 +01:00
ManoloFLTK
f4f93fda15 Fix handling of menu widnows taller than their screen
A problem was visible with the menubar test app and a 2-screen system where screens are one above the other.
When moving down the huge menu, it became positioned on the wrong screen.
2025-03-10 10:14:58 +01:00
ManoloFLTK
b09d09e3c5 Update bundled libdecor to last upstream version (6 mar 2025) 2025-03-09 13:28:08 +01:00
Albrecht Schlosser
c2bc59f610 Update more README files for 1.5.0 2025-03-08 19:11:42 +01:00
Albrecht Schlosser
0c4d2be71b CMake: set FLTK_OPTION_STD effectively "always on"
Temporarily done by setting the internal variable FLTK_USE_STD to 1.
This affects FL/fl_config.h where FLTK_USE_STD will always be 1.

Source code that checks this variable should be fixed soon.
2025-03-08 19:08:04 +01:00
Albrecht Schlosser
6a12e5a609 Update .gitignore: remove configure stuff 2025-03-08 17:19:32 +01:00
Albrecht Schlosser
347d35a8c0 Update README and configure related stuff for 1.5.0
- remove configure stuff from more README files
- move documentation/README.txt to README.documentation.txt
2025-03-08 17:10:32 +01:00
ManoloFLTK
0941f0600a Add Fl_Darwin_System_Driver::filename_relative()
This removes the last instance in FLTK of use of #if __APPLE__ instead of the driver mechanism.
2025-03-08 16:59:02 +01:00
Albrecht Schlosser
43e24a7541 Update two README files for 1.5.0
- remove configure related stuff
- improve documentation in these files
2025-03-08 16:14:55 +01:00
ManoloFLTK
26ff0df6cf Remove warning sent by Doxygen about too many #endif 2025-03-08 15:29:24 +01:00
Albrecht Schlosser
7d58f06a20 Remove 'configure' from README's and sources (partially)
More to come...
2025-03-08 15:19:48 +01:00
Matthias Melcher
ff62ed249e Fluid: one small fix. 2025-03-08 00:21:12 +01:00
Matthias Melcher
15ad447e2a Fluid: last incremental chage, restructuring 2025-03-08 00:14:27 +01:00
Matthias Melcher
ca22660bbb Fluid: last incremental change: restructuring 2025-03-08 00:14:27 +01:00
Albrecht Schlosser
187eaa0441 Update GitLab CI for FLTK 1.5.0
- remove autotools build (build-autotools)
- build documentation with `cmake`, not `make`

To do: build fluid docs
2025-03-07 23:31:14 +01:00
Matthias Melcher
1186b4e255 Making fl_filename_... public for std::string.
New functions append "_str" to the function name to
avoid ambiguities when calling them. So
'char *fl_filename_name(const char *)' becomes
'std::string fl_filename_name_str(const std::string &)'
2025-03-07 20:26:03 +01:00
Matthias Melcher
70e5dc23ae Cleaning up widget browser, renamed to Node_Browser. 2025-03-07 19:52:54 +01:00
Matthias Melcher
c3571838cb Fluid: Rebuilding most of the widget directory.
One file per logical unit.
Namespaces.
Non-static data member initializers to never
get an uninitialized field again.
2025-03-07 18:54:24 +01:00
ManoloFLTK
89f714cb4e Remove platform-specific code from file cp936ext.h 2025-03-07 17:43:03 +01:00