Commit Graph

5012 Commits

Author SHA1 Message Date
Armin Novak
df64d00a97 [warnings,api] fix -Wunused-result
With marking publid API [[nodiscard]] some problematic error checks in
the core library were uncovered. This commit addresses these
shortcomings.
2026-02-17 11:07:08 +01:00
Armin Novak
f4b0549c5b [client,warnings] properly handle function return 2026-02-16 09:18:38 +01:00
Armin Novak
9ecfb268fe [freerdp,client] mark function pointers [[nodiscard]] 2026-02-16 09:18:35 +01:00
Wladimir Kirjanovs
31346e9024 [android] Fix invert scrolling default value mismatch
The `getInvertScrolling()` fallback default was `false`, while
the XML preference in `settings_app_ui.xml` defines `android:defaultValue="true"`.

On a fresh install, if `PreferenceManager.setDefaultValues()` has not yet
persisted the XML defaults into SharedPreferences, the fallback value
`false` is returned instead of the intended `true`. This causes the
"Invert Scrolling" option to appear checked in the UI but not actually
take effect until the user toggles it manually.

Change the fallback from `false` to `true` to match the XML default.

Fixes #12308
2026-02-15 18:25:28 +01:00
Armin Novak
1ac24accf0 [client,sdl] fix move constructor of SdlWindow 2026-02-14 20:35:25 +01:00
akallabeth
0ff34a1124 Merge pull request #12217 from akallabeth/sdl-fs
Sdl fullscreen
2026-02-14 12:20:03 +01:00
Armin Novak
52cd988410 [client,sdl] fix cursor surface creation
* Pass the pixel width and height to SDL_CreateSurface
* Pass display scaled hotspot to SDL_CreateColorCursor
2026-02-14 10:06:12 +01:00
Armin Novak
3503be620a [client,sdl] log cursor scale 2026-02-14 10:03:01 +01:00
Armin Novak
07bf4e9c10 [client,sdl] improve cursor updates
* use std::unique_ptr for temporary SDL_Surface (ease up cleanup)
* better logging of errors (add full surface details)
2026-02-14 10:02:57 +01:00
Armin Novak
1b577a755e [client,sdl] add toString for SDL_Rect 2026-02-14 09:44:47 +01:00
Armin Novak
62c10e59d8 [client,android] fix platform dependent jlong size
always cast to int64_t to avoid format string issues.
2026-02-13 19:54:26 +01:00
Armin Novak
da71c28c9c [client,sdl] create a map of pixel coordinates
We need pixel coordinates for each monitor, but SDL may return logical
coordinates depending on HighDPI mode used by the system.
This commit does:
* Detect which HighDPI mode is in use isHighDPIWindowsMode
* Creates a map of pixel coordinates for each monitor
  * recreated whenever a monitor changes)
  * Updates the window rdpMonitor data for existing windows
2026-02-13 19:24:15 +01:00
akallabeth
3cb88eefd6 [client,sdl] detect displays on startup before RDP
do a simple display query on main SDL thread before starting RDP.
This way the required rdpMonitor details are already available when the
monitor layout or desktop resolution must be sent to the server
2026-02-13 19:24:15 +01:00
akallabeth
e2dd2eedab [client,sdl] implement display detection handling
* SdlContext::detectDisplays to create a initial list of displays and
  their rdpMonitor configuration
* SdlContext::getDisplays to query a SDL_DisplayID at runtime
* SdlContext::getDisplayIds to query available SDL_DisplayID at runtime
2026-02-13 19:24:15 +01:00
akallabeth
efa15e1dc2 [client,sdl] implement a static SdlWindow::query function
The display settings can not be proplerly queried by SDL without a
window. Create a temporary, invisible window for a requested monitor and
query the required details from that window.
2026-02-13 19:24:14 +01:00
akallabeth
99a44990ba [client,sdl] rename SdlContext::removeDisplay
To match with SdlContext::addDisplayWindow rename it to
SdlContext::removeDisplayWindow
2026-02-13 19:24:10 +01:00
14c66c8bfc [client,SDL] Fix properly handle smart-sizing
* In fullscreen set desktop resolution to argument provided with
  /smart-sizing:<width>x<height>
* In window mode set the window size to /size:<width>x<height> and the
  remote resolution to /smart-sizing:<width>x<height>
* Ignore and print a warning if /multimon is in use (currently not
  defined)
2026-02-13 09:07:09 +01:00
Armin Novak
b4c9ab9e93 [client,x11] apply /size:xx% only once 2026-02-11 09:46:05 +01:00
tsz8899
ecc18608ad [client,windows] Enhance memory safety with NULL checks and resource protection 2026-02-11 09:06:52 +01:00
Armin Novak
fd9d199fd5 [client,sdl] use bounds checking vector accessors 2026-02-10 19:27:48 +01:00
Armin Novak
adbab03503 [client,sdl] modernize C++: use std::scope_guard 2026-02-10 15:53:07 +01:00
Armin Novak
6f6ab57eb7 [client,sdl] use std::make_shared 2026-02-10 15:53:05 +01:00
Armin Novak
5624856b8b [client,sdl] fix missing include 2026-02-10 15:53:03 +01:00
Armin Novak
ec39fbad59 [client,x11] do not va_end uninitialized list 2026-02-10 15:53:03 +01:00
akallabeth
cb3fb59a89 Merge pull request #12285 from akallabeth/pulse-name
Use application details for names
2026-02-10 12:18:25 +01:00
Armin Novak
2679cf6bf8 [client,x11] refactor headers
* Use a forward definition in xf_types.h for xfContext
* Resolve circular dependencies on xfreerdp.h
2026-02-10 11:29:21 +01:00
Armin Novak
d3e8b3b936 [client,x11] lock cache when providing data 2026-02-10 11:26:12 +01:00
Armin Novak
169d358734 [client,x11] destroy XImage on window unmap
When unmapping rails window destroy the cached XImage of appWindow
2026-02-10 11:26:08 +01:00
Armin Novak
dac2c20800 [client,common] use application details for messages 2026-02-10 11:20:14 +01:00
Armin Novak
1994e98442 [client,x11] lock appWindow
When using xf_rail_get_window lock the hash talbe until xf_rail_return_window
2026-02-09 18:30:11 +01:00
Armin Novak
b4f0f0a18f [client,x11] fix xf_rail_window_common cleanup
leave the appWindow for later cleanup.
2026-02-09 15:50:19 +01:00
Armin Novak
9362a0bf8d [client,x11] stringfiy functions for RAILS 2026-02-09 13:39:28 +01:00
Armin Novak
58409406af [client,X11] fix clipboard update
Synchronize channel thread with RDP thread when accessing clipboard
formats
2026-02-09 12:59:00 +01:00
akallabeth
2341b5cec3 Merge pull request #12268 from tsz8899/feat/keyboard-sync-complete-recommit
[client,windows] Implement complete keyboard indicator synchronization
2026-02-09 12:39:14 +01:00
akallabeth
12947ae121 Merge pull request #12248 from motor-dev/master
[client,sdl] fix multimon/fullscreen on wayland
2026-02-09 08:54:27 +01:00
akallabeth
68bf770f94 Merge pull request #12261 from tsz8899/fix/window-handle-validation
[client,windows] Add window handle validation in RDP_EVENT_TYPE_WINDOW_NEW
2026-02-09 08:45:04 +01:00
akallabeth
258f07d269 Merge pull request #12264 from tsz8899/feat/error-handling-enhancements
[client,windows] Enhance error handling and context validation
2026-02-09 08:44:47 +01:00
tsz8899
73a82577fa [client,windows] Initialize variable in wf_keyboard_set_indicators as requested 2026-02-08 21:52:14 +08:00
tsz8899
ed371b216a [client,windows] Fix return value checks for mouse event functions 2026-02-08 20:27:38 +08:00
tsz8899
9c3b638a5c [client,windows] Implement complete keyboard indicator synchronization 2026-02-07 02:33:01 +08:00
tsz8899
65fb43add6 [client,windows] Enhance error handling and context validation 2026-02-06 13:55:26 +08:00
tsz8899
b8a7e2ddf0 [client,windows] Add window handle validation in RDP_EVENT_TYPE_WINDOW_NEW 2026-02-06 13:48:47 +08:00
motor-dev
d01698752c [client,sdl] fix multimon/fullscreen on wayland
Help SDL identify the display to use for fullscreen even when compositors interfere with window positions.
SDL respects the intent of a window if it is moved to the appropriate display just before it is made fullscreen.
2026-02-05 23:16:24 +01:00
akallabeth
123be8e009 [client,x11] fix orientation setting of rdpMonitor 2026-01-29 22:19:20 +01:00
akallabeth
b7a92956e6 [client,sdl] log all cursor related errors 2026-01-29 22:00:46 +01:00
akallabeth
f24ac2c7b0 [client,sdl] add SDL_Error to exceptions 2026-01-29 20:46:21 +01:00
akallabeth
4e3b4d9371 [client,sdl] do not apply window offset
only apply the offsets if multimon drawing is active.
2026-01-28 22:44:21 +01:00
akallabeth
a97a2ef24d [client,sdl] refactor exception class 2026-01-28 22:05:32 +01:00
akallabeth
a9e3954076 [client,sdl] simplify mouse cursor update and restore 2026-01-28 21:49:31 +01:00
akallabeth
7e220eee98 [client,sdl] ignore missing renderer
When trying to map screen to pixel coordinates ignore a NULL renderer.
This was sometimes observed with X11 backend.
2026-01-28 21:31:59 +01:00