Commit Graph

10548 Commits

Author SHA1 Message Date
ManoloFLTK
7020356df9 Slightly re-organize class Fl_Wayland_Window_Driver 2023-05-22 09:05:07 +02:00
ManoloFLTK
60440632ee Fix name of static member variable Fl_Wayland_Screen_Driver::wl_display
and add explanatory comment.
2023-05-20 06:05:34 +02:00
ManoloFLTK
89454508a2 Fix Fl_Simple_Terminal::append(str, len) assumes a null terminated string (#728) 2023-05-19 18:57:18 +02:00
ManoloFLTK
033880673a Add null-pointer check for tall menu window under Wayland+KDE 2023-05-17 09:39:39 +02:00
ManoloFLTK
e5ac5678dc Fix handling of tall menu windows with the KDE Wayland compositor
Unfortunately (sigh), the KDE Wayland compositor does not seem to support
correctly, that is, as described by the Wayland protocol, popup windows
that are taller than the display : there is no means to make it draw such popup
so that part of it is above the screen top, whereas the 3 other tested compositors
(Mutter, Weston, Sway) don't have this problem.

This commit implements a new approach to draw tall menu windows, and uses
it only with the KDE compositor : instead of asking the compositor to slide the
menu window up, the menu window remains at a fixed position and the graphics
inside the window is slided up.

This requires to add a member variable, int offset_y, to class menuwindow, that
gets used only for the Wayland platform and that contains the vertical offset by which
graphics to the menu window is moved, expressed in FLTK units. An accessor
to the address of this member variable is added to class Fl_Window_Driver.
2023-05-15 12:40:24 +02:00
ManoloFLTK
1555132df1 Wayland: improve tall menu window support with xdg_positioner_set_offset() 2023-05-13 16:29:51 +02:00
ManoloFLTK
7a50c8234a Wayland: slightly simpler surface_enter() for toplevel GL windows 2023-05-12 08:47:56 +02:00
ManoloFLTK
7ef6b9f802 Wayland: fix opening GL top-level window on 2-screen system - cont'd 2023-05-11 18:59:34 +02:00
ManoloFLTK
37abac2d8e Wayland: fix opening GL top-level window on 2-screen system 2023-05-11 18:42:07 +02:00
ManoloFLTK
4fb18ffbdd Fix "Provide --without-fluid configure option" - cont'd (#725) 2023-05-10 14:41:48 +02:00
Albrecht Schlosser
a4c6c18b3d Fix doxygen doc generation and document platform specific files
Pure platform specific files like 'src/*_win32.cxx' are excluded from
doxygen processing and don't need doxygen specific guard macros.

Document this fact prominently at the beginning of each file.

Fix exclude patterns and remove duplicates from Doxyfile.in.
2023-05-09 22:36:41 +02:00
ManoloFLTK
fe0fcecd61 Fix "Provide --without-fluid configure option " (#725)
Add new --disable-fluid configure option.
2023-05-09 16:19:12 +02:00
Albrecht Schlosser
ac7b55d8bb Fix some but not all memory leaks in test/utf8 demo
Note: Fl_Input::value() copies the string to an internal buffer,
  fl_strdup() before value() is not necessary.
2023-05-08 16:26:07 +02:00
Albrecht Schlosser
712fc72fef [CMake] Use an object library to speed up fluid build
Currently 'fluid' comes as up to three different targets, compiled
from the same source files (fluid, fluid-cmd, and fluid-shared).

The object library is built from all source files except fluid.cxx
and finally all 'fluid*' programs are linked with this library.
This avoids compiling the same source files multiple times.
2023-05-07 21:18:52 +02:00
ManoloFLTK
89a2b1a7a8 Fl_Wayland_Screen_Driver::get_system_scheme() is not needed 2023-05-03 14:17:10 +02:00
ManoloFLTK
a94fed77e4 Wayland: clearer procedure to complete initialisation of screen data 2023-05-03 08:50:19 +02:00
ManoloFLTK
9ffeef7697 Wayland: problem with menus on secondary monitor - cont'd (#724) 2023-05-02 17:59:08 +02:00
ManoloFLTK
ef5bf60239 Wayland: problem with dropdown menus on secondary monitor (#724) 2023-05-02 14:50:33 +02:00
ManoloFLTK
cad6e63296 libdecor: update with upstream source code as of 2023-may-2
This will allow to create narrow decorated windows without crash.
2023-05-02 11:35:28 +02:00
ManoloFLTK
0394a27074 Wayland: wl_cursor_theme_load() may return NULL 2023-05-01 21:41:26 +02:00
ManoloFLTK
02c7ee5128 Fix regression in Fl::screeen_xywh() introduced at 9ea0cc8 2023-05-01 21:10:43 +02:00
ManoloFLTK
ae65a6bf99 Check return values of calls to libxkbcommon functions (#727) 2023-05-01 17:36:36 +02:00
ManoloFLTK
3e2c8d5a95 Allow building Wayland platform without dbus - cont'd (#726)
CMake-based building without dbus is made possible
2023-04-30 21:36:19 +02:00
Matthias Melcher
a2929b15ba Undid old change in Windows code that causes undesired results (STR 1115)
Windows created when another window was grab()'d would always become
dependents under WIN32, hiding them when the grabbed window was hidden.
2023-04-30 20:08:44 +02:00
ManoloFLTK
cdd1566cf9 Allow building Wayland platform without dbus (#726)
This commit supports configure-based builds without the dbus-dev package;
CMake-based builds are expected to be changed in further commit.
2023-04-30 18:41:49 +02:00
ManoloFLTK
7a8343e7e4 Fix crash reported in issues #723 and #724 2023-04-29 17:06:55 +02:00
ManoloFLTK
52a15632a6 Make sure Wayland surface size is integer multiple of wld_ scale 2023-04-28 11:27:32 +02:00
ManoloFLTK
04e996ee81 Improve integration with the OWL Wayland compositor 2023-04-28 09:47:20 +02:00
ManoloFLTK
9ea0cc89fb Slightly simpler Fl_Wayland_Screen_Driver::open_display_platform() 2023-04-27 17:06:46 +02:00
Matthias Melcher
982d104adb FLUID: Initialisation orner in menus: #722 2023-04-26 20:24:33 +02:00
ManoloFLTK
e82e709bcc Multiline Fl_Input: fix move up/down in non ASCII text 2023-04-26 08:25:32 +02:00
ManoloFLTK
58bd71f26d Wayland filename drag-n-drop: fix final null byte 2023-04-25 16:49:45 +02:00
ManoloFLTK
8489a245ee Wayland: accept all data_device_manager protocol versions 2023-04-25 10:25:34 +02:00
ManoloFLTK
1ae25242bd Wayland: set required version of wl_seat protocol to 2 2023-04-25 09:35:46 +02:00
Albrecht Schlosser
6f77f40aad Windows: define _WIN32_IE for older MinGW versions (#710)
... if _WIN32_IE is not defined. Older MinGW versions would
otherwise not define SHGFP_TYPE_CURRENT which is needed since
commit 5a4e7caa54 that fixes
GitHub issue #710: "Fl_Preferences not stored on Windows 10".

This commit is based on Ian's work as discussed in fltk.coredev, thread
"fltk-1.4 build error in Fl_WinAPI_System_Driver.cxx with 32-bit mingw"
on Apr 20, 2023.
2023-04-24 14:26:56 +02:00
ManoloFLTK
4bf9172a8e Replace internal fl_create_offscreen() calls by new Fl_Image_Surface 2023-04-23 10:03:02 +02:00
ManoloFLTK
897a6910b6 Slightly simpler Fl_Wayland_Graphics_Driver::copy_offscreen() 2023-04-23 09:37:36 +02:00
ManoloFLTK
544ab551e1 Remove superfluous #include directive 2023-04-21 23:48:23 +02:00
ManoloFLTK
fe972185c0 Fl_Window_Driver::destroy_double_buffer() does not need overrides 2023-04-21 16:27:08 +02:00
ManoloFLTK
f8f7e101f3 Remove unnecessary Fl_Window_Driver::flush_Fl_Window() 2023-04-21 14:33:26 +02:00
ManoloFLTK
9a00f36113 Wayland: keep window resizable after native file chooser - cont'd 2023-04-20 16:45:18 +02:00
ManoloFLTK
bcab001eb5 Wayland: keep window resizable after native file chooser 2023-04-20 15:29:40 +02:00
ManoloFLTK
8d79e4ad43 Inform Wayland compositor that most FLTK windows are opaque 2023-04-20 10:06:43 +02:00
ZJUGKC
385cabf3aa
Add const qualifiers to can_undo and can_redo (#720) 2023-04-17 16:12:03 +02:00
ManoloFLTK
54ef53d4ae Move constant expression out of loop 2023-04-17 10:28:27 +02:00
ManoloFLTK
256e368368 Wayland: account for memorised keyboard surface before wl_surface_destroy() 2023-04-17 08:19:59 +02:00
Albrecht Schlosser
ac76239db7 Remove scheme specific initialization from Fl_Tree_Prefs
This initialization would prevent changing the 'selectbox' type
automatically when changing the FLTK scheme.

It would also require to set the FLTK scheme *before* the constructor
of Fl_Tree_Prefs (i.e. Fl_Tree) is executed which is unexpected and
error prone for user code.

It is up to the user program to set another boxtype after the
constructor if needed.
2023-04-15 20:31:35 +02:00
Albrecht Schlosser
c3560a8b02 Fix compiler warning [-Wunused-parameter] 2023-04-15 20:05:12 +02:00
Albrecht Schlosser
652b69842b Fix tiny memory leak in fluid (setting scheme)
Also initialize 'scheme_name' to make static code analyzer happy.
2023-04-14 19:52:33 +02:00
ManoloFLTK
1a7ed133d0 Fix for "Wayland: heap-use-after-free after popup/pulldown" (#719) 2023-04-14 19:09:38 +02:00