Commit Graph

10561 Commits

Author SHA1 Message Date
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
ManoloFLTK
7091df8c93 Restore building with macOS SDK 10.9 and earlier 2023-04-14 17:57:33 +02:00
Matthias Melcher
e18b5353cd Fixed leak in Fl_Text_Buffer #716 2023-04-14 16:54:11 +02:00
Matthias Melcher
afd3fde5de Memory leak in Input_ #716 2023-04-14 16:32:36 +02:00
ManoloFLTK
7e2defc10d macOS: remove calls to deprecated API 2023-04-14 15:24:18 +02:00
ManoloFLTK
4768ebaf8b test/utf8: improve use of Fl::set_fonts(const char *) across platforms 2023-04-14 08:58:16 +02:00
ManoloFLTK
0fe118aa94 Remove duplication of Pango standard font names
And move each array of standard font names to appropriate font-related source file
2023-04-14 08:15:50 +02:00
Albrecht Schlosser
4769e0085d Fix more compiler warnings (comma at end of enum)
These warnings are benign but ... I fixed them nevertheless.
2023-04-13 22:55:18 +02:00
Albrecht Schlosser
ee3f9dd06d Fix more missing quotes in fltk-config.in (#714)
Sorry for the noise.
2023-04-13 22:13:18 +02:00
Albrecht Schlosser
4bc63da34d Fix compiler warnings [-Wpedantic]
Remove extra semicolons after function definitions
2023-04-13 20:27:00 +02:00
Albrecht Schlosser
7b2c770ef7 Fix trailing comma in enums of public headers
Compiler warning: comma at end of enumerator list [-Wpedantic]

Note 1: I decided to fix these warnings although trailing commas in
enums are allowed at least since C++11.

Note 2: I fixed only public headers because these headers may be
compiled in user code. To do: check internal headers.
2023-04-13 20:14:36 +02:00
Albrecht Schlosser
9d380f24bd Fix misplaced 'const' [-Wignored-qualifiers]
warning: type qualifiers ignored on function return type
2023-04-13 19:58:26 +02:00
Albrecht Schlosser
c9ea7380d2 Fix compiler warning if user code is compiled with '-Wextra' (2)
Replace '(void*)' cast with '(fl_intptr_t)' because older gcc (4.8.2)
issues a warning with '(void*)'.
2023-04-13 18:56:59 +02:00
ManoloFLTK
232a5399d7 Lower Pango required version from 1.22 to 1.16 2023-04-13 14:32:51 +02:00
ManoloFLTK
caaa11a96f Standardize API to "graphics context" across platforms
Rename fl_wl_cairo() to fl_wl_gc()
Add function cairo_t* fl_cairo_gc() under OPTION_USE_CAIRO
2023-04-13 10:02:40 +02:00
ManoloFLTK
e6c9deb4a4 Wayland: limit copied pixels when window update is a region - cont'd
Simpler Fl_Wayland_Window_Driver::flush_overlay() is enough.
2023-04-12 15:01:35 +02:00
ManoloFLTK
2d263a830a Wayland: limit copied pixels when window update is a region - cont'd
Handle Fl_Overlay_Window objects
2023-04-12 00:32:20 +02:00
Albrecht Schlosser
9e00bd2606 Document the new 'fltk-config' features (#647, #656)
fltk-config has been extended to allow more than one source file
and additional compiler flags and link libraries. This commit adds
documentation (no functional changes).
2023-04-11 18:38:08 +02:00
Albrecht Schlosser
7d8195140c Add public accessor methods Fl_Widget::needs_keyboard()
- add public getter and setter for
- document the new methods
- document that these methods are not yet used internally
- remove unnecessary friend declaration 'NEEDS_KEYBOARD' flag
- simplify Fl::focus(Fl_Widget *) using the new methods.
2023-04-11 16:38:24 +02:00
Albrecht Schlosser
8639c43e3a Fix compiler warning if user code is compiled with '-Wextra'
This commit fixes two similar warnings:

"cast between incompatible function types from ‘void (*)(Fl_Widget*)’
 to ‘void (*)(Fl_Widget*, void*)’ [-Wcast-function-type]"
2023-04-11 15:10:07 +02:00
Albrecht Schlosser
f9669b80b9 Fix fltk-config check for local invocation and libs (#717)
This updates the changes done for issues #647 and #656.
2023-04-10 22:02:57 +02:00
Albrecht Schlosser
3835b72e2f Fix CMake generation for minimal CMake version (3.2.3)
Unfortunately `execute_process(COMMAND pkg-config ...)` used for
CMake versions lower than 3.4 appends a trailing newline ('\n')
to the output variable which must be removed.

Replace double slash '//' returned by pkg-config with a single '/'
for consistency (applies to all CMake versions).

Tested with CMake 3.2.3 but we should probably raise the minimal
CMake version to a more recent version in the future.
2023-04-10 16:19:09 +02:00
Albrecht Schlosser
027e738655 Fix compiler warning [-Wsign-compare] 2023-04-10 15:58:05 +02:00
Albrecht Schlosser
100786222c Fix missing quotes in fltk-config.in (#714) 2023-04-10 00:46:08 +02:00
Albrecht Schlosser
877126e572 Allow more input files and compiler flags in fltk-config (#647, #656)
Also refactor, reformat, and simplify code:
- move all variable substitutions to the beginning of the file
- simplify Cairo support and nesting of 'if' clauses
- unify indenting: 4 spaces, no tabs
2023-04-09 17:15:47 +02:00
ManoloFLTK
00b82b287c Add usage example of Fl_Window::cursor(const Fl_RGB_Image *, int, int) 2023-04-08 21:23:43 +02:00
ManoloFLTK
eaf50f4779 Wayland.dox: add "Fractional scaling" paragraph 2023-04-08 21:08:19 +02:00
ManoloFLTK
4c567a4dd9 Fix "Giant cursor on Wayland + fractional scaling" (#713) 2023-04-08 06:50:56 +02:00
ManoloFLTK
0691833375 Wayland: non-resizable windows are positioned in the wrong place (#711) - cont'd
That is also expected to be the fix for #712
2023-04-07 15:47:01 +02:00
ManoloFLTK
ad8dd440d2 Wayland: fix for issue #712 (hopefully) 2023-04-07 14:47:03 +02:00
ManoloFLTK
c149091deb Wayland: fix reporting of relative location of multiple displays 2023-04-07 10:14:11 +02:00
ManoloFLTK
6f0e9b6580 Wayland.dox: beef up information related to listeners 2023-04-06 11:37:06 +02:00
ManoloFLTK
0c930b9ca3 Wayland: limit copied pixels when window update is a region 2023-04-05 23:21:43 +02:00
ManoloFLTK
5cedb9e174 Wayland backend draws everything two or three times - cont'd (#708) 2023-04-05 14:57:38 +02:00
Matthias Melcher
2711b2f66a
Removed Fulltick reference 2023-04-04 17:39:28 -05:00
Matthias Melcher
c852d53fd3
Removed the Fulltick reference 2023-04-04 17:37:33 -05:00
ManoloFLTK
e790a3a185 Remove superfluous #include directives 2023-04-04 15:30:18 +02:00
ManoloFLTK
0ba4e39edd Add minor details to README.Wayland.txt 2023-04-04 09:59:28 +02:00