Commit Graph

1495 Commits

Author SHA1 Message Date
ManoloFLTK
4f894e4745 Cairo graphics driver: Improve drawing of Fl_Pixmap and Fl_Bitmap
Previously, these objects were drawn slightly blurred on HighDPI.
This commit has them resized to the pixel size of the area where
they are being drawn and then drawn.
2023-11-25 12:09:54 +01:00
ManoloFLTK
eb9dd202b2 Fix Fl_Wayland_Image_Surface_Driver c'tor 2023-11-20 10:56:36 +01:00
ManoloFLTK
dd1c2fc843 Wayland: fix moving top-level window around with mouse 2023-11-15 11:48:45 +01:00
Albrecht Schlosser
4b315d190c Fix dependencies and whitespace issues 2023-11-14 18:14:48 +01:00
ManoloFLTK
888dc5f5c5 Have libdecor-gtk implement the "GTK Shell" protocol 2023-11-12 19:13:35 +01:00
ManoloFLTK
ce9ba4ba08 Remove unseless code in Fl_Wayland_Screen_Driver.cxx 2023-11-12 08:40:37 +01:00
ManoloFLTK
ff134f0081 Wayland: make fl_close_display() free more resources 2023-11-09 07:58:08 +01:00
ManoloFLTK
5989caf070 Wayland: fix crash in editor after return from switching user 2023-11-08 10:25:08 +01:00
ManoloFLTK
93b26e4d3b Let Wayland FLTK client apps survive switching user 2023-11-08 09:18:30 +01:00
ManoloFLTK
8b31954d66 "hitting esc to close fltk app blows out the window manager" (#821) 2023-11-07 11:32:12 +01:00
ManoloFLTK
acc96cdf56 CHANGES.txt: add Fl_Grid, Fl_Window::maximize()
Also, remove stray virtual keyword.
2023-11-06 07:44:55 +01:00
ManoloFLTK
0ae927a00e Add Fl_Window::maximize() and Fl_Window::un_maximize() 2023-11-05 19:42:55 +01:00
ManoloFLTK
d4d72cfdaf Related to "FLTK doesn't work normal on platform of rockchip" (#817) 2023-11-03 22:10:01 +01:00
ManoloFLTK
eb3afb2033 Wayland copy: destroy data_source object before creating new one 2023-11-03 15:16:36 +01:00
ManoloFLTK
a3f4c62826 Wayland copy: destroy data_source object before creating new one 2023-11-03 13:12:32 +01:00
ManoloFLTK
c0c0ea18aa Fix "fltk 1.4.x: hangs during paste in fluid code editor" (#818) 2023-11-03 12:50:18 +01:00
ManoloFLTK
040607b595 Minor change in Fl_Wayland_Graphics_Driver::copy_offscreen() 2023-11-02 09:08:16 +01:00
ManoloFLTK
0e41ca820d Remove 81615bb causing GL window to blink when resizing on macOS (#813) 2023-10-31 16:52:59 +01:00
ManoloFLTK
99826a5fba Minor simplification in Fl_X11_Window_Driver::flush_double(int) 2023-10-30 18:27:12 +01:00
ManoloFLTK
06d12892f9 Fix "Wayland: Overlay windows look blurred" - cont'd (#808) 2023-10-25 15:20:34 +02:00
ManoloFLTK
35d8504263 Fix "Wayland: Overlay windows look blurred" - cont'd (#808) 2023-10-25 13:02:34 +02:00
ManoloFLTK
a5e8fbcca0 Fix "Wayland: Overlay windows look blurred" (#808) 2023-10-24 23:09:09 +02:00
ManoloFLTK
0636c0b3e6 Wayland: implement scale factor windows as popups - cont'd 2023-10-24 19:25:59 +02:00
ManoloFLTK
3868ea90bd Wayland: implement scale factor windows as popups - cont'd 2023-10-24 09:43:23 +02:00
ManoloFLTK
e0aae4401a Use #ifdef FLTK_USE_SVG instead of #if FLTK_USE_SVG 2023-10-23 16:40:48 +02:00
ManoloFLTK
3307a1281f Prepare Fl_Wayland_Screen_driver.cxx for removal of Fl_Int_Vector 2023-10-23 16:21:16 +02:00
ManoloFLTK
39a157a7dd Wayland: implement transient scale factor windows as popups
as discussed in issue #794.
Also, fix for macOS the use of the FL_FOCUS event for these transient windows
2023-10-23 11:15:04 +02:00
Albrecht Schlosser
1209e9dcd7 Make Fl_String and Fl_Int_Vector private (#789)
- add CMake option 'OPTION_USE_STD'
- add configure option '--enable-use_std'
- move FL/Fl_String.H to src/Fl_String.H
- move FL/Fl_Int_Vector.H to src/Fl_Int_Vector.H
- remove Fl_String from demo program examples/callbacks.cxx
- remove Fl_Int_Vector from public header FL/Fl_Table.H
- some methods of Fl_Table are no longer inline
- add CMake option OPTION_USE_STD to allow std::string in some
  selected functions and methods

Experimental, may be removed before release:

- use either Fl_Int_Vector or std::vector in Fl_Table depending
  on CMake OPTION_USE_STD or configure --enable-use_std

Move all fl_filename* functions that use Fl_String to fluid

Main changes in fluid:
 - add fluid_filename.h and .cxx
 - include "fluid_filename.h" rather than <FL/filename.H>

Update fl_input(), fl_password() and test/ask

- add maxchar parameter to fl_input() and fl_password()
- fl_input_str() and fl_password_str() are optional and return
  std::string if enabled (FLTK_USE_STD)
2023-10-22 19:35:17 +02:00
ManoloFLTK
9f141aefc6 Fix drawing points in complex shape mode with Cairo (#792) 2023-10-17 21:14:34 +02:00
ManoloFLTK
50b04b565b Fix Crashes and warnings when Fl_Double_Window is smaller than 1x1 (#798) 2023-10-17 09:37:01 +02:00
ManoloFLTK
ae4ed35229 Add virtual void Fl_Graphics_Driver::draw_circle() 2023-10-16 20:53:55 +02:00
ManoloFLTK
ded5839d9c Improve Fl_Wayland_Window_Driver::take_focus() 2023-10-14 09:43:35 +02:00
Albrecht Schlosser
01038e832a Fix trailing whitespace and dependencies 2023-10-13 19:08:30 +02:00
ManoloFLTK
c274ae1365 Remove obsolete comments 2023-10-13 15:30:12 +02:00
Matthias Melcher
c41b3a1a64
Fixes fl_filename_relative on Linux, Mac, and Windows (#787)
* fixed filename_relative for Linux
* Fixing fl_filename_relative for MSWindows.
* Update documentation
* Fixed docs.
* Fixes Linux and macOS builds
2023-10-11 23:26:36 +02:00
ManoloFLTK
bb7e1635ad macOS: remove a bunch of deprecation warnings 2023-10-09 11:16:36 +02:00
ManoloFLTK
d1436f4f63 Clean long source lines in Fl_Wayland_Graphics_Driver.cxx 2023-10-09 09:11:20 +02:00
ManoloFLTK
da15a12ffe Fix " Wayland compilation warnings" (#788) 2023-10-09 08:11:54 +02:00
Albrecht Schlosser
1fd6f0dd3a Fix STR 3458: "GLUT compatibility mode segfaults"
... "when there's no current window".

Silently ignore GLUT function calls that need a current window if the
current window is NULL, return 0 from functions that return an 'int'.

Check if window is shown in Fl_X11_Gl_Window_Driver::swap_buffers().
This would issue "XRequest.nnn: GLXBadDrawable 0x0" on X11 otherwise.

Note: the chosen implementation to ignore GLUT calls silently appears
to be compatible with GLUT (3.7) whereas FreeGLUT 3.0 would issue error
messages and exit. The latter could be implemented as well but would
be much more work.
2023-10-07 17:14:11 +02:00
ManoloFLTK
6571bd2f28 Wayland: whitespace only changes 2023-10-05 17:07:55 +02:00
ManoloFLTK
e8f633cf2f Wayland: remove useless code 2023-10-04 10:24:27 +02:00
ManoloFLTK
aa14ffe6a1 Fix fltk.coredev: mandelbrot demo segfault under Wayland 2023-10-03 21:56:01 +02:00
ManoloFLTK
4132590d8c Wayland: add security test to avoid NULL pointer dereferencing 2023-10-03 08:13:33 +02:00
ManoloFLTK
ff0a3a9d59 Wayland: throttle window redraws during interactive resizes (#776) 2023-09-29 12:29:52 +02:00
ManoloFLTK
b8fa522ca4 New member function Fl_Wayland_Graphics_Driver::create_wld_buffer()
The previous member Fl_Wayland_Graphics_Driver::create_shm_buffer() is now
renamed to create_wld_buffer() and divided in 2 parts:
- one is related to the draw buffer;
- the other is related to the wl_buffer and is what is now called create_shm_buffer().
This allows to delay creation of the wl_buffer until absolutely necessary,
done inside Fl_Wayland_Graphics_Driver::buffer_commit().
2023-09-25 16:40:01 +02:00
ManoloFLTK
59b251cc39 Slightly simpler Fl_Wayland_Window_Driver::flush()
and beef up description of Wayland's mechanism to throttle screen redrawing.
2023-09-24 09:52:48 +02:00
ManoloFLTK
220dd47bea Increase reuse of mmap'ed data by FLTK Wayland buffer factory 2023-09-22 11:51:24 +02:00
ManoloFLTK
a26e12590c Step back commit 8248183 that's unsatisfactory while resizing windows 2023-09-18 13:06:13 +02:00
ManoloFLTK
be07e5448f Improve reuse of mmap'ed data by Wayland buffers 2023-09-17 13:05:50 +02:00
Matthias Melcher
6bb5a81cee Adds some convenience methods.
fl_filename_absolute can no generate a path using arbitrary source paths.
Fl_Menu_ adds find_item_with_user_data and find_item_with_argument
Fl_String adds find(string, start)
2023-09-05 14:45:57 +02:00