Commit Graph

177 Commits

Author SHA1 Message Date
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
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
4b86e4bdd0 [client,sdl] fix hidden dialog update 2025-05-22 09:10:21 +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
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
akallabeth
04c1c75d63 [client,sdl] only send relative mouse event if no cursor shown 2025-04-10 08:48:50 +02:00
akallabeth
7e11df73ba [client,common] add setting FreeRDP_MonitorOverrideFlags
use this mask to mark monitor settings set from command line.
2025-04-10 08:31:56 +02:00
akallabeth
6f8dddd5a9 [client,sdl] make std::queue thread safe 2025-04-10 08:31:52 +02:00
akallabeth
3c354a5f1b [client,sdl] refactor display update 2025-04-10 08:31:45 +02:00
akallabeth
bcdac17bda [client,sdl] wrap connection dialog
* make all getter/setter threadsafe
* decouple SDL update, run in SDL event queue
2025-04-07 17:45:45 +02:00
akallabeth
55865f1f2d [client,sdl] remove RDP and SDL thread dependencies 2025-04-07 11:10:35 +02:00
akallabeth
dde00a3646 [cmake] group project targes 2025-04-07 11:09:41 +02:00
akallabeth
96ddcd71a7 [client,sdl] quit on window close
When a window close button is pressed terminate the RDP session.
2025-04-03 15:53:57 +02:00
akallabeth
2950825dd5 [client,sdl] fix unused result warning 2025-04-03 13:41:35 +02:00
akallabeth
0a3602cb9a [client,sdl] fix multimonitor fullscreen 2025-04-03 13:37:20 +02:00
akallabeth
ec9c935c36 [client,sdl] unify all gdi_suppress_output calls 2025-04-03 12:17:11 +02:00
akallabeth
da7fefba11 Revert "[freerdp,codecs] fix deprecation for GCC"
This reverts commit 67fabc34dc.

The change eliminates the deprecation warnings but produces
Wredundant-decl warnings instead...
2025-04-03 11:32:16 +02:00
akallabeth
85523ac7d4 [client,sdl] simplify suppress output handling 2025-04-03 11:25:08 +02:00
akallabeth
cfa63ad2f0 [client,sdl] fix return by abort event 2025-03-27 12:39:09 +01:00
akallabeth
8d469feda0 [client,sdl] fix initial window size
* on high dpi displays set appropriate initial display size (divide
  pixel size with scale)
* send display resize on window resize events
* send display resize on any window event (minimize/maximize/expose/...)
2025-03-26 20:34:57 +01:00
akallabeth
a82e0dec2f [client,sdl] fix crash on suppress output
SDL events might be triggered before the RDP session is up. Check the
context for NULL.
2025-03-25 16:47:42 +01:00
akallabeth
64a114f69f [client,sdl] fix windows type mismatch 2025-03-25 11:53:40 +01:00
akallabeth
6f326ad1ef [clinet,sdl] send local layout to server 2025-03-25 11:11:54 +01:00
akallabeth
6f66fdf28c [client,sdl] fix assertions
On processing SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED do not assert
functions but only their result.
2025-03-25 09:07:03 +01:00