232 Commits

Author SHA1 Message Date
Armin Novak
92ab55c5e1 [winpr,stream] Add Stream_ResetPosition
A helper function that does not require return checks, in contrast to
Stream_SetPosition, which might fail.
2026-03-01 06:11:59 +01:00
Armin Novak
e5816d65ce [c23,server] replace NULL with nullptr 2026-02-26 14:34:11 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +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
8a24443ed6 [nodiscard] fix wrong attribute position 2026-02-24 16:10:11 +01:00
akallabeth
b2f325251a [server] add WINPR_ATTR_NODISCARD macro 2026-02-24 11:03:46 +01:00
Armin Novak
dbef19705b [server,shadow] clean up code, check returns
* Fix return value checks
* Mark internal functions [[nodiscard]]
* Refactor x11 backend to simplify locking checks
2026-02-19 12:23:02 +01:00
Armin Novak
86327cba6f [server,shadow] fix return and parameter checks 2026-02-19 08:49:33 +01:00
Armin Novak
48769060aa [server,shadow] simplify locking
use a wrapper function holding the locks, so no error conditions need to
be checked and the lock is released unconditionally.
2026-02-18 13:23:48 +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
a1c72a2f85 [server,warnings] properly handle function return 2026-02-16 09:18:39 +01:00
akallabeth
74648eb3a9 [c,standard] use C99 inline 2025-09-26 11:29:26 +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
4b2d65e977 [server,shadow] add option to hide mouse cursor 2025-04-10 09:10:33 +02:00
akallabeth
44d5461cd5 [warnings] fix -Wunused-but-set-variable 2025-03-06 07:15:20 +01:00
akallabeth
5faf0149c2 [server,shadow] readd multi rect BitmapUpdate support
* Partially revert 1f83198bb1
* Introduce new /bitmap-compat command line option for shadow-server
* Default to send multi rectangle BitmapUpdate
2025-02-28 11:19:36 +01:00
akallabeth
26eac974fe [warnings] fix integer casting
* use WINPR_ASSERTING_INT_CAST where possible
 * fix a few inconsistencies
2024-12-19 12:33:42 +01:00
akallabeth
b5f95e0f87 [codespell] fix spelling mistakes 2024-11-21 11:28:06 +01:00
akallabeth
4dfe2968d0 [servser,shadow[ fix bitmap update error message 2024-11-18 17:12:03 +01:00
akallabeth
965d231e49 [return checks] fix use of CloseHandle 2024-09-16 08:22:31 +02:00
akallabeth
ba41d5e532 [warnings] fix unchecked return 2024-09-15 09:08:02 +02:00
akallabeth
adc4f2abf8 [warnings] fix unused variables 2024-09-12 13:29:58 +02:00
akallabeth
9a027833b9 [warnings] fix misplaced widening cast 2024-09-03 17:40:55 +02:00
akallabeth
9c9d74e920 [warnings] fix redundant casts 2024-08-29 12:03:09 +02:00
akallabeth
15456e1ee1 [warnings] fix implicit widening conversion 2024-08-29 10:47:20 +02:00
Armin Novak
1f83198bb1 [server,shadow] send BitmapUpdate with single rectangle
See https://github.com/FreeRDP/FreeRDP/issues/10413

Microsoft ditched support for RFX and multiple rectangles in BitmapUpdate for
windows 11 24H2.

So send all updates only with a single rectangle.
2024-08-08 08:37:51 +02:00
Armin Novak
62eba8dacb [server,shadow] fix NSCoded and SurfaceBitsCommand 2024-07-24 21:54:46 +02:00
Armin Novak
d757dfee24 [server,shadow] Fix RFX SurfaceBitsCommands
* Use RLGR mode from settings (might be overwritten by client)
* Only send RFX SurfaceBits if SURFCMDS_STREAM_SURFACE_BITS was set in
  capabilities
2024-07-24 21:54:36 +02:00
akallabeth
23295dc386 [server,shadow] add option to disable GFX 2024-07-23 16:38:30 +02:00
Armin Novak
1806daa375 [channel,server] fix unguarded use of functions
If functions of channel_<name>_server are used guard them so the code
compiles if the channel is not compiled in.
2024-06-12 09:58:08 +02:00
akallabeth
1b3f3a0408 [codec,color] expose freerdp_image_copy (no)overlap
expose functions for overlapping and non overlapping images to use
directly
2024-05-23 14:48:36 +02:00
Armin Novak
09060a9a49 [coverity] 1543072 Data race condition 2024-04-15 11:30:31 +02:00
akallabeth
1473931ecd [coverity] 1543220 Double free 2024-04-11 12:04:07 +02:00
akallabeth
bdd866c3d3 [server,shadow] cast incompatible pointer
the context pointer to WTSOpenServerA is intentional, cast to LPSTR to
match definition
2024-03-18 13:27:32 +01:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
akallabeth
4add7836fa [server,shadow] wait for rdpegfx channel ready
we need to wait until the capability messages are exchanged before
starting to issue gfx commands
2024-01-29 19:26:18 +01:00
akallabeth
1f236ade7a [server] make settings opaque 2023-11-24 14:54:56 +01:00
Armin Novak
f08ed58367 [server,shadow] handle gfx thread in shadow server 2023-07-31 20:18:48 +02:00
Armin Novak
a8b9451807 [server,shadow] unify sending caps confirm 2023-07-31 20:18:48 +02:00
akallabeth
5d3b7ef0c2 [server,peer] server instance must support multimon 2023-07-06 09:16:51 +02:00
Martin Fleisz
622a2a8df0 misc: More int to BOOL conversion fixes
This is a follow up to #9129.

This PR fixes some problematic `int` to `BOOL` conversions that might
cause overflows when checking for bit flags.
2023-07-04 09:45:20 +02:00
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
Pascal Nowack
8362b3707e pointer: Rename position to hotspot position in Color Pointer Update
The attributes xPos and yPos for a Color Pointer Update are confusing,
as they may be confused with the xPos and yPos of the pointer bitmap on
the actual screen.
Rename these attributes to what they actually represent, and that is the
hotspot position.
xPos and yPos are still members of the hotspot. However, hotSpotX and
hotSpotY are much more clearer.
In addition to that, the Large Pointer Update uses the same names for
the hotspot coordinates.
2023-04-14 08:31:20 +02:00
Armin Novak
f66110c611 [codec,rfx] refactor API
* Hide implementation details
* Add missing getter/setter
2023-04-05 20:41:42 +02:00
akallabeth
e40b1614f2 [server,shadow] fix assertion in shadow context free 2023-03-14 17:38:59 +01:00
Armin Novak
340101e35e [server,shadow] do not fall back to surfacebits
If GFX channel is desired, do not fall back to surface bits command.
This will break mstsc connections after a DesktopResize was sent.
2023-03-06 21:46:51 +01:00
Armin Novak
e796508c1a [server,shadow] disable AVC modes if none compiled in 2023-03-06 21:46:51 +01:00
Armin Novak
1bf0bb1a26 [server] fixed build without CHANNEL_AUDIN_SERVER 2023-03-06 21:46:51 +01:00