Commit Graph

122 Commits

Author SHA1 Message Date
Ondrej Holy
d7566f5f5a
client: Fix exit codes for /help and similar option (#6741)
* client: Fix exit codes for /help and similar option

Currently, non-zero exit code is returned for /version, /buildconfig, /help,
/monitor-list, /kbd-list and /kbd-lang-list command-line options for several
clients. This is against conventions because 0 is usually returned in
such cases. Also, there is potentially another problem that the returned
codes overflow on UNIX systems (where the exit code is a number between 0
and 255). Let's fix the clients to return 0 in the mentioned cases to honor
conventions and 1 for the command-line parsing errors (or -1 for clients
who already use that value).

Fixes: https://github.com/FreeRDP/FreeRDP/issues/6686

* Refactored freerdp_client_settings_command_line_status_print_ex

Now returns 0 if help or version information was requested.

* Do not eliminate original error status.

Co-authored-by: akallabeth <akallabeth@posteo.net>
2021-01-22 09:44:55 +01:00
akallabeth
f282c55c7a Added clipboard CB_HUGE_FILE_SUPPORT_ENABLED flag 2020-09-29 09:03:49 +02:00
Martin Fleisz
3753f0ea9c Implement gateway message callback for Windows, Wayland and X11 clients 2020-08-04 15:58:48 +02:00
Martin Fleisz
152bf0cda4
Merge pull request #6284 from akallabeth/wayland
Lock wayland buffer updates
2020-06-19 11:44:28 +02:00
akallabeth
c902f583d0 Fixed missing lock during buffer submit. 2020-06-18 08:42:24 +02:00
akallabeth
7361f75d11 Lock wayland buffer updates 2020-06-15 15:49:21 +02:00
Ondrej Holy
ac114d45c7 wlfreerdp: Fix array overrun
This fixes the following defects reported by covscan tool:
 - client/Wayland/wlf_input.c:251: overrun-local: Overrunning array "contacts" of 10 32-byte elements at element index 10 (byte offset 351) using index "i" (which evaluates to 10).
 - client/Wayland/wlf_input.c:308: overrun-local: Overrunning array "contacts" of 10 32-byte elements at element index 10 (byte offset 351) using index "i" (which evaluates to 10).
 - client/Wayland/wlf_input.c:360: overrun-local: Overrunning array "contacts" of 10 32-byte elements at element index 10 (byte offset 351) using index "i" (which evaluates to 10).
 - client/Wayland/wlf_input.c:251: error[arrayIndexOutOfBounds]: Array 'contacts[10]' accessed at index 10, which is out of bounds.
 - client/Wayland/wlf_input.c:308: error[arrayIndexOutOfBounds]: Array 'contacts[10]' accessed at index 10, which is out of bounds.
 - client/Wayland/wlf_input.c:360: error[arrayIndexOutOfBounds]: Array 'contacts[10]' accessed at index 10, which is out of bounds.
 - client/Wayland/wlf_input.c:246: uninit_use_in_call: Using uninitialized value "y" when calling "wlf_scale_coordinates".
 - client/Wayland/wlf_input.c:246: uninit_use_in_call: Using uninitialized value "x" when calling "wlf_scale_coordinates".

The maximal number of touches can be higher then 10, see:
https://wayland.freedesktop.org/libinput/doc/latest/touchpads.html

Let's increse the MAX_CONTACTS count and add checks to prevent usage of
uninitialized values.
2020-06-04 07:55:12 +02:00
akallabeth
cbee45aace Fixed clipboard 'called with invalid type' warning 2020-05-06 13:31:57 +02:00
akallabeth
79522d7e2f Fixed primary monitor index for wayland fullscreen 2020-05-05 10:31:26 +02:00
akallabeth
77b38d9375 Fixed #6087: Inconsistend scroll on wayland
Thanks to @yol and @SaschaWessel a bug in scroll step conversion
was uncovered. The RDP value ranges are inverted when scrolling
in negative direction.
2020-05-04 08:57:56 +02:00
Sascha Wessel
9867793d07 wlfreerdp/cliprdr: Initialize pointer before use
In `wlf_cliprdr_server_format_data_request()` `ConvertToUnicode()` may return 0
while not allocating memory for `cdata` and not setting `cdata` to a valid
address. In this case, `data` points to a random address.

Settting `cdata` to NULL before calling `ConvertToUnicode()` fixes this issues.
2020-04-26 19:57:50 +02:00
David Fort
1fec2f9498 uwac, wlfreerdp: corrected API for UwacOutput and added monitor listing 2020-04-21 08:12:31 +02:00
Julian Albrecht
d69c106a49 Adds the title options to wlfreerdp 2020-04-14 14:33:44 +02:00
akallabeth
9ef1e81c55 Formatted patch. 2020-03-27 14:16:18 +01:00
Julian Albrecht
7ecce5acbe Adds touch support to wlfreerdp 2020-03-27 14:16:18 +01:00
Armin Novak
829497b313 Made CHANNEL_TSMF optional and deprecated. 2020-02-26 13:56:43 +01:00
Armin Novak
c5e261e066 Added new command line swith for automatich assistance control. 2019-11-25 10:32:55 +01:00
Armin Novak
2691532061 Fixed const correctness of encomsp functions. 2019-11-25 09:39:21 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
kubistika
345cc2a2f5 channels: cliprdr: get rid of duplicated server and client code 2019-10-18 14:20:26 +02:00
kubistika
dff3686642 channels: cliprdr: remove formatDataResp.dwFlags
According to the channel docs, this field is only used in format data
request. Therefore, there's no need to hold it in the response. cliprdr
server code was copy-pasted from client code, therefore this must be
some leftover.
2019-10-18 14:20:26 +02:00
Kenny Levinsen
d27ad43093 uwac: Do not memcpy when we swap drawing buffers
The compositor only samples rects that we damage (and have therefore
been overwritten). As we are doing damage tracking and reporting,
memcpy of our old drawing buffer serves no purpose.
2019-07-30 09:46:57 +02:00
Martin Fleisz
3e2be308eb
Merge pull request #5266 from akallabeth/file_list_synth
Added a proper synthesizer for FileGroupDescriptorW to text/uri-list
2019-05-08 15:05:05 +02:00
Armin Novak
6a8755a763 Added image scaling api for software drawing.
For future GFX channel functions an image scaling function is required.
This moves the implementation from wayland client to core library
and adds support for the much faster SWScale library.
2019-05-07 08:56:29 +02:00
Martin Fleisz
25fc56a625
Merge pull request #5260 from akallabeth/rail_spec_update
Rail spec update
2019-04-29 11:27:26 +02:00
Armin Novak
05901280fe Fixed unused argument warnings. 2019-04-05 09:14:35 +02:00
Armin Novak
8bb83f2526 Fixed sign-compare warnings 2019-04-05 09:14:35 +02:00
Armin Novak
1762cd1acb Fixed unchecked return warning. 2019-04-05 09:14:35 +02:00
Armin Novak
54098ab0b5 Fixed unused variable warnings. 2019-04-05 09:14:34 +02:00
Armin Novak
32ea44c037 Added a proper synthesizer for FileGroupDescriptorW to text/uri-list
The file clipboard delegate needs a base URI to operate on for
systems that are not WIN32. Added that to the context and abort
conversion, if that is not set. (currently not fully implemented)
2019-02-21 16:44:40 +01:00
Armin Novak
0a95e4aa78 Fixed #5262: Vertical mouse wheel direction and whell step
* Vertical wheel uses the inverted direction of horizontal wheel.
* The wheel step is now calculated from the value provided by wayland.
2019-02-20 08:56:36 +01:00
Armin Novak
2a06366de3 Added autoreconnect for wayland. 2019-02-19 14:12:25 +01:00
Armin Novak
fe6296a25f Added support for /smart-sizing:<width>x<height> syntax in wayland client. 2019-02-08 12:49:32 +01:00
Armin Novak
f06b31358f Fixed duplicate log tag definition in wayland client. 2019-02-08 12:11:15 +01:00
Armin Novak
cc050f1413 Fixed conversion range checks and cast for use with cairo 2019-02-08 12:08:30 +01:00
Armin Novak
bb755f1944 Removed unused variables. 2019-02-08 12:08:30 +01:00
Armin Novak
4a3f4ad340 Fixed color format for wayland mouse pointer. 2019-02-08 12:08:30 +01:00
Armin Novak
7413370783 Added mouse pointer scaling. 2019-02-08 12:08:30 +01:00
Armin Novak
8d6a6df48a Implements #5215: Smart sizing using libcairo 2019-02-08 12:08:30 +01:00
Ilya Shipitsin
d1939cfc4f client/Wayland/wlf_cliprdr.c: resolve possible null pointer dereference
found by cppcheck

[client/Wayland/wlf_cliprdr.c:143] -> [client/Wayland/wlf_cliprdr.c:158]: (warning) Either the condition 'clipboard' is redundant or there is possible null pointer dereference: clipboard.
[client/Wayland/wlf_cliprdr.c:163] -> [client/Wayland/wlf_cliprdr.c:178]: (warning) Either the condition 'clipboard' is redundant or there is possible null pointer dereference: clipboard.
2019-02-01 03:50:51 +05:00
Armin Novak
2dab778101 Fixed NULL dereferences and uninitialized values 2019-01-30 16:11:10 +01:00
Armin Novak
5c930dc4aa Fixed compiler warnings #5210 2019-01-29 16:15:33 +01:00
Armin Novak
2418c43cac Fixed pointer image update. 2019-01-29 09:34:30 +01:00
Armin Novak
23fa6b9182 Added mouse cursor callback stubs. 2019-01-29 09:34:30 +01:00
Armin Novak
823411c2f3 Fixed wayland buffer updates
The wayland buffer size always matches the current window size.
That might be different from the actual remote framebuffer size,
to when copying always use the correct strides to avoid distorted
screen content.
2019-01-25 10:49:03 +01:00
Armin Novak
86e20d7647 Removed buffer damage tracking in client, let UWAC handle that. 2019-01-24 12:44:21 +01:00
Armin Novak
0cf898e722 Fixed warnings found by compiler and static analysis. 2019-01-24 11:53:52 +01:00
Armin Novak
728cdfd689 Fixed warnings found by compiler and static analysis. 2019-01-24 11:53:52 +01:00
Armin Novak
087390b303 Refactored client clipboard function callbacks for const data pointers. 2019-01-23 16:55:13 +01:00
Armin Novak
891d9760dc Ignore clipboard events if channel not loaded. 2019-01-23 16:01:36 +01:00