Commit Graph

10451 Commits

Author SHA1 Message Date
ManoloFLTK
43c4bd1031 Wayland: improve switching window to/from fullscreen mode
The call to Fl_Window::fullscreen() can be made before or after the window is show()'n
Tested compositors: Mutter, Plasma, Weston.
2023-03-29 08:49:14 +02:00
ManoloFLTK
5e101bc00c Wayland + Plasma: fix switching fullscreen mode for borderless window 2023-03-28 14:39:11 +02:00
ManoloFLTK
43a9c70d8c Wayland: fix regression in test/fullscreen
Commit e918d94 to fix issue #708 broke turning back from fullscreen state
for borderless window, visible in test/fullscreen.
2023-03-28 05:10:52 +02:00
Albrecht Schlosser
5a4e7caa54 Windows: use SHGetFolderPathW() for application data folder (#710)
See GitHub issue #710: "Fl_Preferences not stored on Windows 10"

Summary: don't use the undocumented registry key "Shell Folders",
use function SHGetFolderPathW() instead although this function is
meanwhile deprecated (but available since Windows XP).

Note: tested with 32-bit build running on Windows XP (works).
2023-03-27 19:51:09 +02:00
ManoloFLTK
6aa6866d80 Wayland: move "struct seat" inside class Fl_Wayland_Screen_Driver 2023-03-27 11:31:26 +02:00
ManoloFLTK
31b5d5b562 Complete Fl_Wayland_Screen_Driver::close_display() 2023-03-27 11:06:17 +02:00
ManoloFLTK
cce40848ce Improve methods Fl_Wayland_Screen_Driver::en/disable_im() 2023-03-26 17:38:44 +02:00
ManoloFLTK
a242e4a65d Implement methods Fl_Wayland_Screen_Driver::en/disable_im() 2023-03-26 11:04:01 +02:00
Albrecht Schlosser
16338ff4e4 Wayland: remove compilation warning (#706) - cont'd
The previous attempt to fix this issue in commit
dcb4c39956 missed to remove the keyword
'struct' in the offending statement. This new commit actually removes
the compiler warning.
2023-03-25 16:40:52 +01:00
Albrecht Schlosser
9c53d84ceb configure: test jpeg lib before png and zlib
For some obscure reason finding the jpeg lib *after* configuring for
local zlib and/or local png lib failed and thus switched to using the
local jpeg unexpectedly. Searching for jpeg libs before png/zlib fixes
this issue.

Note: this is a pragmatic fix (aka workaround) rather than fixing the
underlying issue. It would be interesting to find out why this happened.
2023-03-25 16:16:52 +01:00
ManoloFLTK
40537ae335 Wayland: slightly simpler writing of function wl_keyboard_key() 2023-03-25 15:52:03 +01:00
ManoloFLTK
9aa62f4492 Add Fl_Cairo_Graphics_Driver::focus_rect() override
This allows to bypass what looks like a Cairo bug:
FLTK_SCALING_FACTOR=1.7   bin/test/tabs
click on tab2
---> crash

But no crash with other scaling factor values (e.g., 1.8).
2023-03-25 15:31:30 +01:00
ManoloFLTK
9d7e680925 Wayland: Fl::get_key(c) for lower case letters different behavior from X11 (#404) 2023-03-25 14:51:57 +01:00
ManoloFLTK
f3423d3e83 More accurate documentation of function fl_wl_cairo() 2023-03-25 14:51:57 +01:00
ManoloFLTK
9f9e584919 Wayland Fl_Copy_Surface and Fl::copy() issues (#707) - cont'd 2023-03-24 16:56:25 +01:00
ManoloFLTK
e918d94b67 Fix: Wayland backend draws everything two or three times (#708) 2023-03-24 15:34:35 +01:00
ManoloFLTK
dcb4c39956 Wayland: remove compilation warning (#706)
drivers/Wayland/Fl_Wayland_Window_Driver.cxx:1515:47: warning: declaration ‘struct wld_window::custom_cursor’ does not declare anything
2023-03-23 18:42:02 +01:00
Albrecht Schlosser
aebf2fec39 Improve Fl_Cairo_Window documentation (typos + indentation)
Also fix a doxygen warning in Fl_String.
2023-03-23 13:26:14 +01:00
ManoloFLTK
b98aa7bee6 Remove extraneous Wayland-related comment from Windows code 2023-03-22 21:05:28 +01:00
Albrecht Schlosser
8b327d1ddd Fix option CAIRO_EXT in combination with X11 on macOS
This modification became necessary since "__APPLE__" is no longer
undefined by the build system when X11 is used on macOS.
2023-03-22 21:01:36 +01:00
Albrecht Schlosser
510ba8e46d Fix test/demo for X11 on macOS (e.g. XQuartz)
This modification became necessary since "__APPLE__" is no longer
undefined by the build system when X11 is used on macOS.
2023-03-22 20:29:23 +01:00
ManoloFLTK
2c03959511 CMake: check for presence of needed Wayland protocol source files 2023-03-22 10:45:24 +01:00
ManoloFLTK
1a8d6662ce osissues.dox: add "The Wayland/X11 hybrid library" 2023-03-21 10:43:53 +01:00
ManoloFLTK
8178d95eb6 Add documentation of 0S-specific fl_mac_gc() 2023-03-20 11:09:58 +01:00
ManoloFLTK
41c94c4d87 Wayland: attempt to improve registry_handle_global_remove()
This function still needs to be tested on a true multi-display Unix box
2023-03-20 10:39:55 +01:00
ManoloFLTK
ad3ead111a Simulate one display for OWL Wayland compositor 2023-03-20 09:57:36 +01:00
Matthias Melcher
f37347dd6e
Fix and consolidate settings dialogs (#346, #703) 2023-03-19 20:04:01 +01:00
Matthias Melcher
f9004352b4 Fix gl_rect and OGL::fl_point #688 2023-03-18 20:14:39 +01:00
Matthias Melcher
5c482f9d9b
Fix and update alignment #346 (#701)
* interactive layout alignment rewritten
* interface for new alignment rules
* new alignment dialog box
* user defined layout rules added
* layout rules can be stored in projects, settings, and external files
* Valgrind verification
2023-03-18 17:33:27 +01:00
ManoloFLTK
a9fb6a979f Rename bool variable for better clarity 2023-03-16 10:41:54 +01:00
Rob McDonald
09b7b4719d Protect GL_SILENCE_DEPRECATION from re-definition. 2023-03-15 23:15:32 +01:00
Albrecht Schlosser
0f41797b7a Cairo: introduce Fl::cairo_flush() in FLTK API
Flushing the Cairo context is necessary on Windows to make Cairo
drawings appear on the device (screen). This new method makes it easy
for user code to do this correctly after using Cairo drawings.

- add Fl::cairo_flush(cairo_t *)
- document Fl::cairo_flush(cairo_t *)
- reformat Cairo doxygen docs and code (partially)
- use the new method in Fl_Cairo_Window
- use the new method in test/cairo_test.cxx
- other minor (text) changes in test/cairo_test.cxx
- add test/cairo_test to the demo menu (test/demo.menu)
2023-03-14 19:51:34 +01:00
ManoloFLTK
0eb6a0e193 Fix Fl_Wayland_Screen_Driver::get_mouse() for scale factor effect 2023-03-14 16:59:29 +01:00
ManoloFLTK
add43cd3fc Wayland: add support for multiple high or low DPI displays - cont'd 2023-03-14 11:50:44 +01:00
ManoloFLTK
16448d5ba8 Wayland: improve cursor_surface_enter() 2023-03-14 08:09:39 +01:00
ManoloFLTK
8aafe6cf69 Fix Fl_Wayland_Window_Driver::set_cursor_4args() 2023-03-13 15:31:12 +01:00
ManoloFLTK
9980dc6fa1 Remove unused variable 2023-03-13 12:31:25 +01:00
ManoloFLTK
3edab90f38 Wayland.dox: document recent changes about custom cursors 2023-03-13 11:32:06 +01:00
ManoloFLTK
eeb9267e6e Wayland: add support for multiple high or low DPI displays 2023-03-13 10:38:28 +01:00
Albrecht Schlosser
af4789077f Simplify the previous Cairo drawing fix (#694)
The Cairo context 'cc' should be used directly rather than calling
'Fl::cairo_cc()' again.

Sorry for the noise.
2023-03-12 16:20:54 +01:00
Albrecht Schlosser
6e407cb169 Fix Cairo drawing in test/cairo_test demo for Windows (#694)
On the Windows platform Cairo drawings must be flushed explicitly.
This is done in Fl_Cairo_Window after calling the draw callback but
it was neither done nor documented in test/cairo_test.cxx when using
another type of Window with its overloaded draw() method, i.e. when
FLTK was configured with --enable-cairoext or CMake OPTION_CAIROEXT.

Note: user code must either explicitly flush the Cairo drawings as
done here or destroy the Cairo context which is not done in this demo
because the Cairo context should be kept alive.
2023-03-12 16:01:58 +01:00
ManoloFLTK
73a2ca5261 Fix c'tor of Fl_Wayland_Image_Surface_Driver for HighDPI displays 2023-03-10 13:17:53 +01:00
ManoloFLTK
2ee688dae9 Improve member function Fl_Wayland_Gl_Window_Driver::make_current_before() 2023-03-10 10:17:20 +01:00
Albrecht Schlosser
0f3b5ded8f Fix dependencies, typos, trailing whitespace, and formatting
No code changes.
2023-03-09 18:28:37 +01:00
ManoloFLTK
e18ce5400f Remove Doxygen warning about incorrect #include directive 2023-03-09 18:16:45 +01:00
ManoloFLTK
a624290b27 Remove warnings when fl_attr.h is compiled in C 2023-03-09 18:10:38 +01:00
Albrecht Schlosser
8b1ec4c531 Fix Visual Studio (MSVC) compiler warnings 2023-03-09 17:47:51 +01:00
ManoloFLTK
2527632054 Fix gl_overlay under Wayland 2023-03-09 17:41:37 +01:00
Albrecht Schlosser
5175192755 CMake: build shared libs with OPTION_CAIROEXT (issue #250)
- remove separate libfltk_cairo to avoid cyclic dependencies, but
- keep a dummy libfltk_cairo in 1.4.0 for backwards compatibility
- move cairo/Fl_Cairo.cxx to src/Fl_Cairo.cxx
- add preliminary Cairo support for Visual Studio (MSVC)

Static linking is not affected by this change, but users building
with hand-made Makefiles will have to remove libfltk_cairo starting
with FLTK 1.4.0. The dummy library can be linked for backwards
compatibility but it will be removed later (in 1.4.x or 1.5.0).

The shared FLTK library libfltk.{so|dylib|dll|..} depends on libcairo
if and only if FLTK is built with one of the Cairo options. This has
always been the case for OPTION_CAIROEXT but is now also true if only
OPTION_CAIRO is selected, i.e. FLTK programs linked with a Cairo
enabled shared FLTK library will also be linked with libcairo. The same
is true for configure options --enable-cairo and --enable-cairoext,
respectively.

Preliminary Cairo support for MSVC now detects a Cairo installation
using the CMake variable FLTK_CAIRO_DIR which must be set by the user.
Note that this feature is temporary and may be changed in the future
for a better and more comfortable version.
2023-03-09 17:34:05 +01:00
ManoloFLTK
e32d4bcab9 Fix Fl_Wayland_Screen_Driver::x() and friends 2023-03-09 16:56:57 +01:00