Commit Graph

10482 Commits

Author SHA1 Message Date
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
ManoloFLTK
74cd7817af Remove unneeded #include directives 2023-04-03 16:11:24 +02:00
ManoloFLTK
1d0e63ea78 Improve member function Fl_Wayland_Screen_Driver::surface_to_window()
Rename it to Fl_Wayland_Window_Driver::surface_to_window() and
avoid loop over all mapped FLTK windows that used to be performed.
2023-04-03 15:25:19 +02:00
ManoloFLTK
cebf6b5368 Wayland: update comment about differences between compositors
Mutter goes back to what it did in earlier versions.
Fortunately, FLTK can handle this change.
2023-04-03 11:20:26 +02:00
ManoloFLTK
7e08bd7e26 Wayland + Weston: fix focus loss after click on titlebar 2023-04-03 08:21:07 +02:00
ManoloFLTK
e239d00cad Fix "Wayland: non-resizable windows are positioned in the wrong place" (#711) 2023-04-02 18:05:36 +02:00
ManoloFLTK
81f1ddad1d Add details about what version of Ubuntu is required for Wayland 2023-04-02 16:15:58 +02:00
ManoloFLTK
b867488442 Fix "recipe for target '../../src/xdg-decoration-protocol.c' failed" (#704) 2023-04-02 16:04:13 +02:00
ManoloFLTK
64ac7b47b8 Improve detection of the location of Wayland protocol files across OSes 2023-03-29 15:25:29 +02:00
ManoloFLTK
70252b0c1a Improve Wayland support of Fl::event_key(int)
Key pressed when the Wayland window acquires focus are now detected.
2023-03-29 12:53:39 +02:00
ManoloFLTK
a681aa803c Complete explanatory comment about Weston compositor 2023-03-29 09:30:30 +02:00
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