* Move code to client/common to have it in place for all clients without
modification
* Remember if a button was pressed and only suppress move events if no
button is pressed.
The clipboard might be (re)initialized multiple times, to do
initialization and deinitialization in cliprdr_file_context_init and
cliprdr_file_context_uninit.
- 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.
- 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)
- 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
If client-common is build with WITH_SSO_MIB inject a callback that first
tries to retrieve a token from sso-mib library and only if that fails
falls back to a client provided callback.
This change enables an alternative way of acquiring the necessary
access tokens through a local identity broker. In the current
implementation, we need to visit URLs twice and paste back the
URLs we are redirected to in order to extract authorization codes
and ultimately fetch the correct access tokens for RDP (described
here: <0>).
As an alternative, MS also provides the Microsoft Authentication
Library (MSAL) through which authentication can be handled more
or less in the background when we're using a trusted device. In
particular, we can request access tokens with the same
parameters as we're currently doing through the URL-based scheme.
As the MSAL bindings are not available for C, we implemented a
small wrapper library called sso-mib which is available at
https://github.com/siemens/sso-mib. This library translates the
high-level requests (such as acquire_token_interactive) to
respective messages on the D-Bus messaging bus which is used to
communicate with the identity broker service on Linux. The
library can be built as a .deb package and subsequently be
found through PkgConfig mechanisms in CMake.
When sso-mib is not available through pkg-config, it can also
be placed in external/, with the directory structure looking
like the following. include/ is copied from the root of the
sso-mib directory and lib/ populated with the built shared
library files and symlinks.
external/
├── README
└── sso-mib
├── include
│ └── sso-mib
│ ├── mib-account.h
│ ├── mib-client-app.h
│ ├── mib-exports.h
│ ├── mib-pop-params.h
│ ├── mib-prt.h
│ ├── mib-prt-sso-cookie.h
│ └── sso-mib.h
└── lib
├── libsso-mib.so -> libsso-mib.so.0
├── libsso-mib.so.0 -> libsso-mib.so.0.4.0
└── libsso-mib.so.0.4.0
This feature is currently hidden behind a configuration switch
and must be enabled via `-DWITH_SSO_MIB=ON`. If the connection
to the broker fails (for example, if no identity broker is
installed or running on the system), we automatically fall back
to the current scheme of copy-pasting URLs.
<0>: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/e967ebeb-9e9f-443e-857a-5208802943c2