2016 Commits

Author SHA1 Message Date
Armin Novak
17163d3738 [winpr,collections] fix PubSub_OnEvent return checks
* proper return checks on use
* fix return on invalid input arguments
* fix return on no event registered
2026-03-03 13:49:54 +01:00
Armin Novak
b724ba546d [checks,return] fix various unchecked return values 2026-03-03 09:40:27 +01:00
Armin Novak
4ff57b68c2 [client,x11] refactor locking
X11 and railWindows lock must be held at the same time to avoid
deadlocking.
2026-03-01 09:23:42 +01:00
Armin Novak
0445ed6734 [winpr,pubsub] check return of PubSub_Subscribe 2026-02-27 15:52:32 +01:00
Armin Novak
78fd7f580d [client,x11] improve rails window locking
* Add unified lock/unlock functions to allow easier tracing
* Fix a few locking issues found during debugging
* Add an assertion triggering when a lock is locked/unlocked twice
2026-02-27 10:56:12 +01:00
Armin Novak
465a6353d5 [c23,client] replace NULL with nullptr 2026-02-26 15:42:59 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +01:00
Armin Novak
0531803808 [warnings] make function declaration names consistent
Use the same parameter names for declaration and implementation.
2026-02-26 10:35:25 +01:00
Armin Novak
48267edf2f [winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this
macro
2026-02-25 19:23:08 +01:00
Armin Novak
3fcc287b16 [warnings] initialize all va_list 2026-02-25 07:41:39 +01:00
Armin Novak
4b14749013 [client,x11] use element compare
the structs do not have a stable binary representation, compare element
by element.
2026-02-25 07:41:36 +01:00
Armin Novak
9e7aaa9bbc [client,x11] fix debug warnings 2026-02-24 16:23:15 +01:00
Armin Novak
15c9fd0300 [client,x11] typedef x11_keysym_scancode_t 2026-02-24 11:03:45 +01:00
Armin Novak
31e1f17f03 [client,x11] sort keyboard lookup lists 2026-02-23 16:15:43 +01:00
tiemio
e9b71caa09 [client,x11] add keysym-based fallback for keyboard mapping
When using X11 forwarding from non-standard X servers (e.g. XQuartz,
Xephyr), the XKB key names reported by the remote server do not match
the expected evdev names, causing all keys to map to RDP_SCANCODE_UNKNOWN.

Add a keysym-to-scancode lookup table as fallback. Unlike XKB key names,
keysyms are standardized across X11 implementations. The fallback only
fills keycodes that remain unmapped after the XKB pass, so standard
setups are unaffected.

Tested with X11 forwarding from Exegol (Docker) via XQuartz on macOS,
and natively on Linux and macOS.

Related to #4215

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:15:43 +01:00
Armin Novak
db3dcf57b1 [client,x11] fix XGetWindowProperty return handling 2026-02-19 21:59:15 +01:00
akallabeth
1b744c15fe Merge pull request #12319 from akallabeth/grow-reasonable
[allocations] fix growth of preallocated buffers
2026-02-17 15:23:17 +01:00
Armin Novak
118afc0b95 [allocations] fix growth of preallocated buffers
* Replace * 2 with * sizeof(WCHAR) for string usages
* Grow streams and other buffers reasonably, e.g. add 128 elements per
  try and check for possible overflows
* Add constant postfix to force them to 64bit
2026-02-17 13:54:34 +01:00
Armin Novak
c4a0565342 [client,x11] fix xf_DeleteSurface error branch 2026-02-17 11:10:16 +01:00
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
Armin Novak
b4c9ab9e93 [client,x11] apply /size:xx% only once 2026-02-11 09:46:05 +01:00
Armin Novak
ec39fbad59 [client,x11] do not va_end uninitialized list 2026-02-10 15:53:03 +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
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
123be8e009 [client,x11] fix orientation setting of rdpMonitor 2026-01-29 22:19:20 +01:00
akallabeth
495a82c463 [client] mark all WINPR_ATTR_MALLOC also nodiscard 2026-01-26 13:22:28 +01:00
akallabeth
6673e8a86f [core,utils] add freerdp_input_touch_state_string
* Add freerdp_input_touch_state_string
* Remove duplicate from xfreerdp
2026-01-25 09:00:03 +01:00
Armin Novak
43e3b862af [warnings] fix initialization skip warnings 2026-01-21 16:41:26 +01:00
akallabeth
84d3d99338 [clang-tidy] clean up code warnings 2026-01-19 13:05:26 +01:00
akallabeth
0421b53fcb [client,x11] fix double free in case of invalid pointer 2026-01-19 08:53:12 +01:00
akallabeth
fb8efd45f2 [c,format] fix format string and review warnings 2026-01-16 13:36:14 +01:00
akallabeth
c19ba43a82 [c,printf] fix wlog format string to match arguments 2026-01-16 11:40:41 +01:00
akallabeth
884887deb1 [c,printf] fix wlog format string to match arguments 2026-01-16 11:40:39 +01:00
akallabeth
82f958cd9f [c,printf] fix wlog format string to match arguments 2026-01-16 11:40:37 +01:00
akallabeth
f07c6880f6 [c,printf] fix wlog format string to match arguments 2026-01-16 11:40:34 +01:00
Armin Novak
070e2a2ea6 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:35 +01:00
Armin Novak
7a682978cf [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:35 +01:00
Armin Novak
21823872c1 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:35 +01:00
Armin Novak
803c10d32c [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:35 +01:00
Armin Novak
0a793bb887 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:35 +01:00
Armin Novak
902aee4df1 [c++,compat] rename variables clashing with c++ keywords 2026-01-08 09:24:31 +01:00
Armin Novak
4f52920274 [client,x11] abort session when window is closed 2026-01-07 17:24:16 +01:00
akallabeth
6414d81a58 codespell 2025-11-11 08:48:22 +01:00