3275 Commits

Author SHA1 Message Date
Armin Novak
1c590a71e7 Added option to remap scancodes
(cherry picked from commit d7bf6553c558db64e5e3108b08f8ee1d394d1393)
2021-02-25 09:51:41 +01:00
0140454
ed96ca820f Sync numlock, capslock state in Wayland
(cherry picked from commit b56a3691ca35a7f55e31998c55a40a9da9d0d745)
2021-02-25 09:51:41 +01:00
0140454
ea30b6988e Process close event
(cherry picked from commit f61744a062255eaaaaec21c9192666f55559e26e)
2021-02-25 09:51:41 +01:00
akallabeth
2647eefa83 Added wayland discrete axis events for mouse wheel
the discrete axis event gives changes in steps just like the
xfreerdp version uses. This way scrolling can be implemented
consistent with the behaviour of xfreerdp

(cherry picked from commit 2cce37a82a08b0a7c24302a6819371218dea1ec6)
2021-02-25 09:51:41 +01:00
akallabeth
d4dee27b61 Filter out duplicate ClientFormatList announcements
(cherry picked from commit a51f4ccaaa8d4a2232725dc555827705ea8f0429)
2021-02-25 09:51:41 +01:00
Simon Tatham
aa9b644e3a Command-line option to choose an X selection.
I personally find it more convenient to have pasted data written to
the X11 PRIMARY selection, so that I can paste it with a fast middle-
button click, than to write to CLIPBOARD which typically needs a key
sequence or menu action.

This commit adds a command-line option to let me express that
preference: now I can say "/clipboard:use-selection:PRIMARY" on the
command line, which not only enables clipboard transfer but also says
which X selection I want it to talk to. The previous options
"+clipboard" and "-clipboard" are also still supported.

(cherry picked from commit 64948b96c4c4640078ce563b165a907251fd6f20)
2021-02-25 09:51:41 +01:00
Simon Tatham
818480be91 winpr/utils: allow COMMAND_LINE_VALUE_{OPTIONAL,BOOL} to coexist.
Now you can give an option the combination of flags
COMMAND_LINE_VALUE_OPTIONAL and COMMAND_LINE_VALUE_BOOL. If you do,
then all three of the syntaxes +foo, -foo and /foo:value are allowed
at once, and the receiving code can tell the difference because the
Value field is set to BoolValueTrue, BoolValueFalse or a valid char
pointer.

(cherry picked from commit 22c6b375d4ae9bf9dcac74d3360d0042673f1353)
2021-02-25 09:51:41 +01:00
Simon Tatham
04fd010402 xf_cliprdr: fill in support for TIMESTAMP requests.
A selection owner is supposed to respond to a request for the
selection target TIMESTAMP by providing the X server time at which the
selection was written. There was a /* TODO */ comment in xf_cliprdr
where the code to do that should have been.

The absence of this can cause a problem when pasting into some X
clients. xtightvncviewer, in particular, will give up the attempt to
read from the clipboard at all if it doesn't get a satisfactory
response to the initial TIMESTAMP request - and the non-answer zero
value "CurrentTime" counts as unsatisfactory. It won't be happy with
anything short of a real X server time value.

(Checking the VNC source code, that's because it reads both PRIMARY
and CLIPBOARD and picks the one with the later timestamp. So it does
depend on the timestamps existing.)

When you're writing to the selection in response to a normal X event
like a mouse click or keyboard action, you get the selection timestamp
by copying the time field out of that X event. Here, we're doing it on
our own initiative, so we have to _request_ the X server time. There
isn't a GetServerTime request in the X protocol, so I work around it
by setting a property on our own window, and waiting for a
PropertyNotify event to come back telling me it's been done - which
will have a timestamp we can use.

(cherry picked from commit fcabbc9707e23b94d7e82021e997578fb20c9313)
2021-02-25 09:51:41 +01:00
akallabeth
4a2265cb1e Fixed #6696: Implement HandshakeEx in windows client
Special thanks to @byteboon for bisecting the issue

(cherry picked from commit fc20299c22735beb64afe33b958c41506f092c72)
2021-02-25 09:51:41 +01:00
akallabeth
552c18858a Fixed call to GetKeyboardLayout
(cherry picked from commit 8b8016ec21509fda5dfd182cb1d1fb186d272d7a)
2021-02-25 09:51:41 +01:00
akallabeth
43516beb70 Fixed support for huge files in clipboard
(cherry picked from commit f3dad4106a62cf29db0685221cd90b751e3ac2b1)
2021-02-25 09:51:41 +01:00
akallabeth
2d84387fcd Conservative keyboard state sync, refactored input API
(cherry picked from commit b679f3a0ebbbedf039e735523087c58e3b3920e2)
2021-02-25 09:51:41 +01:00
akallabeth
1b06f38041 Fixed display channel anounce race
* The display resolution change message was prone to a race condition
* Check for actual fullscreen state instead of settings
* Assume 75dpi for display resolution to mm conversion

(cherry picked from commit 13c8a60b7095c141321cd2d09f3e36466d54a748)
2021-02-25 09:51:41 +01:00
Armin Novak
7612054de4 Properly discard xfc->appWindow on focus loss
(cherry picked from commit 34e5504bcc1734fd767572a262dec94e551e4c30)
2021-02-25 09:51:41 +01:00
akallabeth
21ba0d2b54 Fixed #6635: Use correct window handle for pointer operations
(cherry picked from commit e8fe552ed4759327d63abf637f464839b2d6306a)
2021-02-25 09:51:41 +01:00
Nathan Loewen
5b2f35747b X11: Scale cursor when SmartSizing is on
(cherry picked from commit f4f795f3233c56fe7f4cd579777115b77f49da1e)
2021-02-25 09:51:41 +01:00
Armin Novak
cbf2a59dd9 Fixed unit tests run under memory sanitizer
(cherry picked from commit 816e792e3f468eebf3c82416b9ef33637c9bd5cc)
2021-02-25 09:51:41 +01:00
akallabeth
b55664d7c1 Fixed sending of clipboard format request response
If a request was pending and new formats were announced the response
to a ServerFormatDataRequest was never sent.

(cherry picked from commit 2efb7d92745614a92c66b721205689a433248d31)
2021-02-25 09:51:41 +01:00
Armin Novak
d62e679821 [MAC] Keep original return value for client termination
(cherry picked from commit 9e63f35cc57da6ba79b0a76207848a85a75769a6)
2021-02-25 09:51:41 +01:00
akallabeth
87db6078f0 Do not eliminate original error status.
(cherry picked from commit 050a68fec901030c7428852f8f536ace055eb2f7)
2021-02-25 09:51:41 +01:00
akallabeth
2dbd33b5bb Refactored freerdp_client_settings_command_line_status_print_ex
Now returns 0 if help or version information was requested.

(cherry picked from commit 531dd81836f2c97fcfcfeabdb9671fb76409ce8d)
2021-02-25 09:51:41 +01:00
Ondrej Holy
cf3ba75673 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
(cherry picked from commit 3ee4cabcfad3a9ccc3c59be21245b57c17e7ae75)
2021-02-25 09:51:41 +01:00
kubistika
9d8d5e5969 x11: use correct contact flag names in xf_input_touch_state_string
(cherry picked from commit a94fe816a4dce96a26cd2ef284f525181d75c865)
2021-02-25 09:51:41 +01:00
Keith Johnston
04d2db2730 Fix for mac mousewheel.
(cherry picked from commit 87a4a8484e65ab591ef815ed0700ab0c90994a77)
(cherry picked from commit c0ecee9d69533095bfdb3dbaf9e76747e5e3a7ab)
2020-12-02 14:23:19 +01:00
Armin Novak
e4b30a5cb6 Removed obsolete connectErrorCode
(cherry picked from commit 3b63903d3fbca0c1b1614aa93ea9ede955da692d)
2020-12-02 14:17:54 +01:00
akallabeth
cb8af3271e Allow autoreconnect for ERRINFO_GRAPHICS_SUBSYSTEM_FAILED
As discussed in #4717 allow autoreconnect to succeed if that
specific error code was returned as disconnection reason.

(cherry picked from commit 552a7ca25f60e9a00585ec298c816911dcf71383)
2020-12-02 14:12:33 +01:00
Armin Novak
aa6d116446 Added permission checks for mac audio backend.
(cherry picked from commit 0e0eb5f41fe5f80385e83132972f9c00cb0b61cb)
2020-12-02 14:10:01 +01:00
Armin Novak
4a148e8704 Fixed mac app termination and warnings
(cherry picked from commit a2e9f5efcb54a409ca67b2794ab20c391d732fe6)
2020-12-02 14:09:54 +01:00
akallabeth
aca1866fc9 Added support for xwayland keyboard grab
(cherry picked from commit 896b7bc711f9e47620078507074960a68309576b)
2020-12-02 09:00:52 +01:00
akallabeth
ac0f0c6500 Added clipboard CB_HUGE_FILE_SUPPORT_ENABLED flag
(cherry picked from commit f282c55c7a02caa80a53e88931725efedcae7085)
2020-12-01 15:10:23 +01:00
Armin Novak
507fecf50e Fixed warnings.
(cherry picked from commit e50a8e09ee3feba4975c488618f5af350d851ad9)
2020-12-01 15:10:23 +01:00
akallabeth
92488d5a3c Use freerdp_settings_[s|g]et* api to access proxy vaiables.
Fixes #6414

(cherry picked from commit 44ea09e7ad0123b8486428c1ceaeeb96b5c01d35)
2020-08-05 11:48:39 +02:00
Martin Fleisz
3522179074 Add GatewayMessageType to public API
(cherry picked from commit 174f3257c9213e77663020d0b8a41220889848fd)
2020-08-05 10:59:50 +02:00
Martin Fleisz
c424322be3 Implement gateway message callback for Windows, Wayland and X11 clients
(cherry picked from commit 2fe8e762d2b6765b486513159d18ffd98e267873)
2020-08-05 10:59:50 +02:00
akallabeth
757b4106e6 Updated version information for 2.2.0 release 2020-07-07 10:56:21 +02:00
Armin Novak
894d926a29 Fixed #6335: windows client title length
(cherry picked from commit dfbeeb1e16d61734319dd32d25ee12e8715a1bc1)
2020-07-06 11:14:35 +02:00
akallabeth
6565326bcd Use CMake to detect availability of getlogin_r
(cherry picked from commit 3a5bfd2bd0eee134dbac4a98dcb3ed5227a8c6dc)
2020-07-06 11:13:51 +02:00
Armin Novak
93bed51ae2 Updated versions to 2.1.2 2020-06-22 12:26:08 +02:00
akallabeth
3606dfa921 Replaced getlogin with getlogin_r
(cherry picked from commit 36478d3d0b3d7fa378a875f60170a08e94747226)
2020-06-22 12:12:02 +02:00
akallabeth
4d6a800850 Fixed missing lock during buffer submit.
(cherry picked from commit c902f583d0911c1e8938c5f14f3f257eb9737745)
2020-06-22 09:30:52 +02:00
Bernhard Miklautz
7f2de8419a fix [client channels]: move exported API calls to client/common
The functions mappedGeometryRef and mappedGeometryUnref are API
functions ([1]) but were implemented in the geometry channel.
In case FreeRDP was built with BUILTIN_CHANNELS=OFF those functions
weren't available globally but used by the video channel.

Now the functions are fixed part of the freerdp-client library and
therefore available for all channels.

[1] exported in freerdp/client/geometry.h

Fixes #6236

(cherry picked from commit 1628939227fa82fa492f068f178f0cc0a42c518b)
2020-06-22 09:30:42 +02:00
akallabeth
809a86f0fb Lock wayland buffer updates
(cherry picked from commit 7361f75d11b77f998cf7dee08c8aa619df98754a)
2020-06-22 09:30:15 +02:00
makki_d
0121f726d8 fix +unmap-buttons option having the opposite effect
(cherry picked from commit 4607a2766afd2875696b7b7febd9dc63f778b8d7)
2020-06-16 11:19:41 +02:00
Ondrej Holy
9a7180cf90 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.

(cherry picked from commit 6ab79961ef09bc0340633319c388b6b7517b1f3d)
2020-06-16 09:08:22 +02:00
Simon Tatham
dc735d3d36 [generate_argument_docbook] Fix typo in XML entity.
The character '>' was being rendered as < instead of >.

(cherry picked from commit 98930bf2759905f2290e5d777f57a79e7589f220)
2020-06-16 09:07:48 +02:00
Armin Novak
ce6f2a271b Fixed #6221: Update floatbar position with multitouch input
(cherry picked from commit 004910ce5d76e114f4f8cfec6429004b26bc4443)
2020-06-16 09:05:31 +02:00
akallabeth
b83f79c3b3 Read newline from stdio on certificate accept
(cherry picked from commit 5b842bc7a78621218b1179923c002d32c41f15fe)
2020-06-16 09:05:01 +02:00
akallabeth
3c33c6e1a2 Prepared version for 2.1.1 2020-05-20 15:55:52 +02:00
akallabeth
8d9464fbc5 Fixed BehaviourSanitizer warning in rdp parser
(cherry picked from commit 771332c04e2dbad964d0cb11a86ff561e792bc35)
2020-05-18 17:10:01 +02:00
Victor K
899df25246 Windows Authentication - Then launced with username argument prefill the name in the authentication box.
(cherry picked from commit 318075676b5ea610b1ba47da600eb418812951cb)
2020-05-18 16:56:03 +02:00