Commit Graph

442 Commits

Author SHA1 Message Date
Armin Novak
9b9fba6709 [client,sdl] improve clipboard logging
* log requests on debug level
* log responses on debug level
2025-09-10 10:55:00 +02:00
akallabeth
fa71856627 [client,sdl] fix global config evaluation
* fix recursive calls, split getters
* fix fallback to system configuration in case user configuration does
  not provide a key
2025-08-29 11:18:18 +02:00
akallabeth
fc1af9a87a [client,sdl] add global config file for SDL clients 2025-08-29 10:53:32 +02:00
akallabeth
ec9e74f5c8 [client,x11] add global config file support 2025-08-29 10:53:29 +02:00
akallabeth
dd1c51a9db [client,sdl] disable connection dialog
when console callbacks are enabled also disable the connection dialog.
2025-08-28 14:55:57 +02:00
akallabeth
8042d7e165 [client,sdl] always set sdl->windows_created
when the window creation function is called always set the event.
2025-08-22 12:09:55 +02:00
akallabeth
65f18983ed [warnings] Fix format string errors
* Fix casts of format string arguments (%p requires void*)
* Fix format string to match type of arguments
2025-08-13 15:09:48 +02:00
akallabeth
c3e507a82e [winpr,wlog] Replace WLog_PrintMessage calls
Prefer WLog_PrintTextMessage to have proper format string checks in
place.
2025-08-13 15:08:01 +02:00
akallabeth
12d0e491f6 [cmake] add installWithRPATH
this new CMake function installs a target to a destination and adds the
correct relative RPATH to some desired locations
2025-07-17 13:59:51 +02:00
akallabeth
f48b129414 [client,desktop] fix StartupWMClass setting 2025-06-26 10:23:43 +02:00
akallabeth
a86e3dc53c [client,sdl] print current video driver 2025-06-24 15:43:57 +02:00
akallabeth
281b924596 [client,sdl2] fix build with webview 2025-06-16 12:50:18 +02:00
akallabeth
ded07fa31e [client,man] improve manpages (see #11357) 2025-06-16 11:56:06 +02:00
akallabeth
6168a7bfd1 [client,common] make all azure settings configurable 2025-06-10 16:30:06 +02:00
akallabeth
dbeda8e568 [client,sdl] fix clipboard leak 2025-06-05 10:45:41 +02:00
akallabeth
b2b2952510 [client,sdl] simplify webview build 2025-06-03 21:09:05 +02:00
akallabeth
a769ac3441 [client,sdl] add metadata to binary 2025-06-03 19:30:07 +02:00
akallabeth
f74a7247cd [client,sdl] fix clang-tidy warnings 2025-06-02 19:05:10 +02:00
akallabeth
63f4c63200 Merge pull request #11635 from motor-dev/master
[client,sdl] Wayland fixes for the SDL backend
2025-06-02 17:57:07 +02:00
Armin Novak
583c9dabda [client,sdl] fix SDL_SCANCODE_KP_PERIOD mapping 2025-05-28 10:09:30 +02:00
yngwe@fry
0c979d1a41 Fixes that were lost in merge
- append the window index to the title. This helps wayland compositor scripts move the multimon windows to different monitors, as Wayland does not obey the placement hint.
- fixed inverted logic when checking the SmartSizing setting.
2025-05-27 23:42:23 +02:00
yngwe@fry
ac981843c9 Multimon/smart sizing fixes for the SDL backend
- properly compute the offsets for each monitor, when monitors have negative offsets or when primary monitor isn't at origin 0:0.
   ‣ SDL_VIDEODRIVER=wayland sdl-freerdp3  /list:monitor
        * [3] [ASUSTek COMPUTER INC VG27AQML1A S2LMQS007046 (DP-1)] 2560x1440	+0+0
          [4] [ASUSTek COMPUTER INC VG27AQML1A S2LMQS007036 (HDMI-A-2)] 1440x2560	+2560+-550
   If the offset is not taken into account, the remote desktop will be drawn with black borders at the top or left hand side of the windows.

- fix smart sizing being applied when not requested (overwriting proper offsets for multimon) and not being applied when requested.

- add monitor ID in the window title to enable wayland compositors (e.g. hyprland) to find the various windows.
   hyprland has one workspace per monitor and refuses to let the application choose the monitor (or sdl-freerdp does not ask nicely).
   sdl-freedrp /multimon opens both windows on the same screen.
   adding a monitor identifier in the title allows hyprland rules to find the window and move it to the proper workspace.

These changes allow sdl-freedrp to find the correct geometry on X11 and Wayland compositors (tested on plasma/kwin and hyprland, on X11, XWayland and native wayland)
2025-05-27 23:13:04 +02:00
yngwe@fry
d998b6e8ba Wayland fixes for the SDL backend
- properly compute the offsets for each monitor, when monitors have negative offsets.
   ‣ SDL_VIDEODRIVER=wayland sdl-freerdp3  /list:monitor
        * [3] [ASUSTek COMPUTER INC VG27AQML1A S2LMQS007046 (DP-1)] 2560x1440	+0+0
          [4] [ASUSTek COMPUTER INC VG27AQML1A S2LMQS007036 (HDMI-A-2)] 1440x2560	+2560+-550
   If the negative offset is not taken into account, the remote desktop will be drawn with black borders at the top or left hand side of the windows.

- also ensures these offsets are not reset at each redraw.

- add monitor ID in the window title to enable wayland compositors (e.g. hyprland) to find the various windows.
   hyprland has one workspace per monitor and refuses to let the application choose the monitor (or sdl-freerdp does not ask nicely).
   sdl-freedrp /multimon opens both windows on the same screen.
   adding a monitor identifier in the title allows hyprland rules to find the window and move it to the proper workspace.

These changes allow sdl-freedrp to find the correct geometry on Wayland compositors (tested on plasma/kwin and hyprland) when using SDL_VIDEODRIVER=wayland
2025-05-26 23:06:02 +02:00
akallabeth
4f4c3e6366 [client,sdl] use new JSON config reader 2025-05-26 19:36:40 +02:00
akallabeth
4b86e4bdd0 [client,sdl] fix hidden dialog update 2025-05-22 09:10:21 +02:00
akallabeth
80a499a4db [client,sdl] build webview without docs/tests/examples 2025-05-15 10:03:37 +02:00
Armin Novak
30c2744151 [ci,nighty] update deb/rpm scripts to package webview
the ci builder does not allow downloading of external sources, so bundle
the webview beforehand.
2025-05-14 10:01:43 +02:00
akallabeth
d67ef1fb6f [cmake,sdl] remove redundant variable 2025-05-13 09:08:47 +02:00
akallabeth
80a1797e8b Merge pull request #11518 from akallabeth/webview-update
Webview update
2025-05-12 19:17:05 +02:00
akallabeth
cf36d437b0 [client,sdl] fix leak with SDL_ttf usage
use correct destroy function.
2025-05-09 08:55:23 +02:00
akallabeth
34232d0972 [client,sdl] refactor sdl dialogs
* create proper class hierarchy for widgets
* encapsulate colors and widget specific drawing in class
* add <ctrl>+<backspace> shortcut do erase text in input dialogs
2025-05-07 06:51:03 +02:00
akallabeth
de19a25d2e [client,sdl] add WITH_DEBUG_SDL log messages 2025-05-06 11:01:02 +02:00
akallabeth
5f173e7f37 [client,sdl] drop support for qt webview
* The implementation is lacking (blocking Qt main loop)
* Just too many dependencies that are pulled in
2025-05-05 17:58:46 +02:00
akallabeth
f013785548 [client,sdl] use FetchContent for webview 2025-05-05 17:58:44 +02:00
akallabeth
a12f14afb6 [client,sdl] fix dpi scaling for dialogs
* Unify SDL_CreateWindowAndRenderer calls
* remove SDL_WINDOW_HIGH_PIXEL_DENSITY flag
2025-05-05 16:22:30 +02:00
akallabeth
e0f20fa986 [client,sdl] refactor keyboard_set_indicators
* Remove unnecessary casts
* Add support for SDL_KMOD_LEVEL5
2025-05-05 12:36:09 +02:00
akallabeth
64217b32b4 [client,sdl] refactor connection dialogs
* use std::shared_ptr for all SDL related allocated variables
* improve SDL polling loop, process all pending events before continuing
  to update the UI
* fix input dialog clipboard support
2025-05-05 12:15:34 +02:00
akallabeth
c9ce8da67a [client,sdl] fix missing nullptr check 2025-05-05 10:10:47 +02:00
akallabeth
c8c2cf58fa [client,sdl] ignore scale update if not connected 2025-05-05 10:08:27 +02:00
akallabeth
10ea342dc4 [client,sdl] ignore SDL_SetWindowSize failures
just log and continue.
2025-05-05 10:08:20 +02:00
akallabeth
0b4893d59c [client,sdl] ignore scale change if call fails
If SDL_GetWindowDisplayScale fails ignore the change.
2025-05-05 10:08:12 +02:00
akallabeth
93a2c02c0a [client,sdl] mark SDL3 as no longer experimental 2025-04-30 16:02:10 +02:00
akallabeth
45d42d1db3 [client,sdl] fix SDL-ttf usage
* hide library in sdl/dialogs, do not call functions from outside
2025-04-22 12:05:57 +02:00
Armin Novak
ce8fc4e0f4 [client,sdl] only draw to window if connected 2025-04-15 10:16:22 +02:00
Armin Novak
fca2974219 [client,sdl] force primary monitor in windowed mode 2025-04-14 16:18:07 +02:00
Armin Novak
55737d1cdd [client,sdl] fix compiler warning 2025-04-14 14:40:27 +02:00
akallabeth
f6be69818f [client,sdl] use a GUID to identify the clipboard
Use a clipboard mime type with a GUID to identify the specific FreeRDP
instance. When running multiple clients it might confuse a clipboard
update from another instance with an internal one otherwise.
2025-04-13 09:58:26 +02:00
akallabeth
3805575c58 Merge pull request #11384 from akallabeth/rel-mouse-change
Rel mouse change
2025-04-11 08:21:14 +02:00
akallabeth
a978a8124f [client,sdl] fix orientation update
* Properly set display orientation in display update messages
* Unify some conversion functions
2025-04-10 15:06:11 +02:00
akallabeth
da21ac3792 [client,sdl] fix clipboard updates
* Ignore updates for our own data (use a special clipboard format to
  identify these)
2025-04-10 13:25:44 +02:00