Commit Graph

11747 Commits

Author SHA1 Message Date
ManoloFLTK
7104746413 Fix crash in howto-drag-and-drop under macOS 2024-06-11 15:04:48 +02:00
ManoloFLTK
d7d1d0d6b2 Wayland: fix interactive moving and resizing of a subwindow - cont'd (#987) 2024-06-11 11:37:45 +02:00
ManoloFLTK
b17357339f Fix: Changing default color palette affects opengl child drawing on Wayland (#989) 2024-06-09 20:04:23 +02:00
ManoloFLTK
e5693efb75 Wayland: support DnD from X11-FLTK to Wayland-FLTK 2024-06-08 09:38:28 +02:00
ManoloFLTK
651d9f3e79 Wayland: add necessary calls to gtk_surface1_release() 2024-06-04 16:53:10 +02:00
ManoloFLTK
e2eeb36883 macOS: remove use of deprecated [NSBox setBorderType:] method 2024-06-03 17:36:08 +02:00
ManoloFLTK
6712130f22 Document how to control window location in screen under Wayland 2024-06-03 15:05:04 +02:00
ManoloFLTK
ce46b4b68b Wayland: fix interactive moving and resizing of a subwindow (#987) 2024-06-03 09:50:41 +02:00
ManoloFLTK
d792ed21f5 Fix Child Windows under Wayland are clipped on resizing … (#987) 2024-06-02 08:28:40 +02:00
ManoloFLTK
482da12f71 Fix: Zero-sized borderless window causes high cpu usage on windows (#985) 2024-06-01 16:48:27 +02:00
ManoloFLTK
be5c82b5e5 Reflect libdecor date in bundled-libs.dox 2024-06-01 10:52:23 +02:00
ManoloFLTK
5365aefc6e libdecor: update to upstream commit c2bd8ad6 (31-may-2024) 2024-06-01 10:12:50 +02:00
ManoloFLTK
04949f1349 Fix typo in doc of Fl_Double_Window::as_double_window() 2024-05-30 08:26:57 +02:00
ManoloFLTK
70c6f2ce12 Fix: Wayland sends wrong events after an FL_DRAG of a top window - cont'd (#983) 2024-05-28 22:28:54 +02:00
ManoloFLTK
9c8977eff1 Fix: Wayland sends wrong events after an FL_DRAG of a top window (#983) 2024-05-28 15:33:33 +02:00
ManoloFLTK
f3f69b892d Remove useless Fl_Window_Driver accessors after new member Fl_Window::get_size_range() 2024-05-27 11:39:27 +02:00
ManoloFLTK
c1333a2dec Wayland documentation: more about opening display connection 2024-05-27 10:40:24 +02:00
Matthias Melcher
e325c2e4a0 Adding new call Fl_Window::get_size_range(), #981 2024-05-26 17:50:47 +02:00
Matthias Melcher
2bab8c94ff Revert InputChoice from fd791a0
A change to Fl_Input_Choice callbacks slipped into
fd791a068e.
This Commit removes that change. It may need to be
fixed and reapplied later in its own Commit.
2024-05-26 17:00:41 +02:00
ManoloFLTK
00dc35097b Control screen used by Fl_Menu_Bar::play_menu() - cont'd 2024-05-24 13:20:58 +02:00
ManoloFLTK
a09d43eb40 Fix: Fl_Browser unexpected display of empty lines ("@." vs "") (#979) 2024-05-24 10:03:37 +02:00
ManoloFLTK
0a6610c480 Control screen used by Fl_Menu_Bar::play_menu() 2024-05-23 16:38:51 +02:00
ManoloFLTK
614d551d05 Wayland documentation: further details about throttling window redraws 2024-05-22 13:13:29 +02:00
ManoloFLTK
df3c875453 Beef up documentation about throttling window redraws under Wayland 2024-05-21 15:28:18 +02:00
ManoloFLTK
8807efe939 More details about handling modal windows and various gnome versions 2024-05-21 09:23:24 +02:00
ManoloFLTK
c5d6382fb1 Wayland: don't call gtk_surface1_release() probably not useful
Also, add comment about when call to gtk_surface1_set_modal() is useful or useless but harmless.
2024-05-20 18:22:19 +02:00
Albrecht Schlosser
f903cf8026 Fix "Support building with unusual prefix" (STR 3434)
Add '$(LDFLAGS)' to build commands for libs, for details see STR 3434.
This applies to configure/make only, CMake builds are not affected.
2024-05-20 15:14:57 +02:00
ManoloFLTK
3d6bcda157 Wayland: accept diverse versions of the GTK Shell protocol 2024-05-19 17:34:39 +02:00
ManoloFLTK
642ec5b74b Slightly reorganize code of Fl_MacOS_Sys_Menu_Bar_Driver::play_menu() 2024-05-18 12:09:49 +02:00
Albrecht Schlosser
d0922792ae Improve fl_contrast() functionality and documentation
- swap 3rd and 4th parameter of fl_contrast()
- change 'Fl_Fontsize fs' to a neutral 'int size' parameter
- clarify documentation of fl_contrast_level() and that different
  contrast algorithms use different level values
- clarify that level 39 for the CIELAB mode results in "sufficient"
  contrast, i.e. /readable/ text which is the only intention of
  fl_contrast().

Reasoning: swapping the arguments looks more natural, i.e. the context
before another argument (size) is what one would usually expect. Since
the 'size' argument doesn't have be a font size, making it a simple
'int size' is more flexible and correct for future extensions.
2024-05-17 14:20:01 +02:00
ManoloFLTK
7410498a7f Comment that macOS windows move OK between LowRes and HighRes screens 2024-05-17 09:53:47 +02:00
Albrecht Schlosser
9820d9f555 Fix and improve fl_contrast() calculations
- src/fl_contrast.cxx:
  - FL_CONTRAST_LEGACY: reset black/white threshold from 55 to 50
  - FL_CONTRAST_CIELAB: change default contrast level from 55 to 39

- test/contrast.cxx:
  - set default contrast mode to CIELAB
  - add "random color" button to test random foreground colors (text)
  - slightly increase terminal size
  - make the Fl_Terminal widget the resizable() of the window
2024-05-16 19:58:24 +02:00
ManoloFLTK
9df6dc2aeb Fix uses of isupper() and isprint() - STR #3436 2024-05-15 14:59:13 +02:00
ManoloFLTK
a9085c3b11 Change member function args to Fl_Menu_Bar::play_menu(const Fl_Menu_Item *) 2024-05-15 11:50:32 +02:00
ManoloFLTK
66c37e5128 Fix crash in test/cube under macOS when using Quit menubar item 2024-05-14 18:15:05 +02:00
ManoloFLTK
79c3db48cf New member function Fl_Menu_Bar::play_menu(const char *title) 2024-05-14 17:46:25 +02:00
Albrecht Schlosser
ea96237525 Update bundled libpng from 1.6.42 to 1.6.43 2024-05-13 19:18:54 +02:00
Albrecht Schlosser
1325a257bf Update README.txt 2024-05-13 19:08:42 +02:00
Albrecht Schlosser
bc63ea7629 CMake: improve linking OpenGL3 example programs (#959)
- Remove find_library(LIB_GLEW ...) from 'resources.cmake'

- Use the variable FLTK_GLEW_DIR to "find" a user supplied GLEW library
  for OpenGL3 example programs (examples/OpenGL3*.cxx).
  Both static and shared libs (DLLs) are supported, but the static
  library is preferred to avoid DLL dependencies.

- Define preprocessor macro 'GLEW_STATIC' by CMake compile definitions
  if and only if the static glew library (glew32s) was found and linked.
  The previous code defined 'GLEW_STATIC' unconditionally in the source
  code which led to undefined references if a shared lib (DLL) was used.
2024-05-13 15:19:27 +02:00
Albrecht Schlosser
d1ea57bc7a CMake: improve finding cairo.dll on Windows
- don't use pkg-config to find Cairo if FLTK_CAIRO_DIR is set
- use FLTK_CAIRO_DIR to locate Cairo headers and DLL if it is set
- otherwise try to find Cairo with pkg-config anyway

This prevents accidentally "finding" the system Cairo libs provided
by MSYS - which would tie the FLTK library and user programs to MSYS,
i.e. it would make FLTK programs depend on the MSYS installation.
2024-05-13 15:18:04 +02:00
ManoloFLTK
a28a7c381d Documentation: add details about handling of FL_DND_RELEASE event
see also STR #3399.
2024-05-13 14:58:14 +02:00
ManoloFLTK
5b3dd72e4e Wayland: call gtk_surface1_set_modal() of GTK Shell protocol - cont'd 2024-05-13 13:24:07 +02:00
ManoloFLTK
95eb4cb91a Remove change erroneously committed at 4eb98c0 2024-05-13 13:07:14 +02:00
ManoloFLTK
4eb98c0af4 Fl_Menu_Bar: document how to programmatically open menu from menubar 2024-05-13 12:46:47 +02:00
Albrecht Schlosser
6c06e953e1 Fix "Cannot build project with CMake ..." (#970)
... (add_library cannot create ALIAS target "fltk" because target
"fltk::fltk" is imported but not globally visible)

It turned out that this was due to a CMake feature that was changed in
CMake 3.18. This commit makes imported FLTK targets globally visible
for CMake versions less than 3.18.
2024-05-13 12:05:27 +02:00
ManoloFLTK
ef33f3e0e2 Wayland: call gtk_surface1_set_modal() of GTK Shell protocol for modal wins
This has the Mutter compositor open modal windows at the center of their parent window
rather than at an unpredictable display position before this commit.
2024-05-11 19:52:00 +02:00
Albrecht Schlosser
e9feef99fa Update README.CMake.txt for building X11 specific programs
Clarify different ways to disable Wayland in executable programs
designed to use X11 specific code w/o further changes.
2024-05-11 17:29:26 +02:00
Albrecht Schlosser
e5afb8a532 Enable suppression of "deprecated" warnings (FL_NO_DEPRECATE)
This is intended for backwards compatibility with FLTK 1.3.x code
ported to 1.4.0.

Users defining FL_NO_DEPRECATE can compile old (1.3.x) code w/o
seeing lots of "deprecated" warnings. A legitimate use case is if
old (1.3) code is intended to be used with both FLTK 1.3 and 1.4.

FL_NO_DEPRECATE should NOT be defined if the user's code is targeted
at 1.4.x or later. Users should fix their code to be prepared for
the next minor release (e.g. 1.5.0).

Todo: document this.
2024-05-11 17:14:28 +02:00
ManoloFLTK
0078733fcb Fix DnD to Wayland FLTK app on the KDE/Plasma desktop 2024-05-11 08:27:05 +02:00
ManoloFLTK
f56999aaf8 Add detailed comment about getting all supported XDND data types 2024-05-11 07:43:27 +02:00