Commit Graph

14969 Commits

Author SHA1 Message Date
akallabeth
10fad497a3 Added data_pdu_type_to_string 2020-11-20 09:39:25 +01:00
Simon Tatham
1dc8198803 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.
2020-11-20 08:34:20 +01:00
Simon Tatham
c90479c7f5 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.
2020-11-20 08:34:20 +01:00
Simon Tatham
3c104d9b9b 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.
2020-11-20 08:34:20 +01:00
Martin Fleisz
be5bd68de0
Merge pull request #6583 from akallabeth/print_warn
Fixed printf format
2020-11-19 10:05:11 +01:00
Kobi
0773582240
Merge pull request #6586 from akallabeth/fedora_fix
Added missing include.
2020-11-18 09:00:08 +02:00
akallabeth
d11422b6b8 Added missing include. 2020-11-18 07:18:25 +01:00
Bernhard Miklautz
460d3e85c6 fix [packaging/rpm]: build for fedora >= 33 2020-11-18 07:13:49 +01:00
akallabeth
e019ed6566 Removed invalid check 2020-11-17 09:04:52 +01:00
akallabeth
f032be12d2 Fixed printf format 2020-11-17 08:53:42 +01:00
David Fort
9d435480c5
Merge pull request #6578 from akallabeth/x11_disp_fixes
Fixed display channel anounce race
2020-11-16 21:19:54 +01:00
akallabeth
13c8a60b70 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
2020-11-13 18:09:07 +01:00
Martin Fleisz
c78e31e451 channel/rdpdr: Fix hotplug for drive redirection on Windows
The path was incorrectly cut of after the drive letter causing hot
plugged drives to show up empty and disconnecting the client if the
device was removed later on.
2020-11-13 12:26:29 +01:00
Martin Fleisz
f3591485bd client/common: Always set gatewayprofileusagemethod to 1
mstsc will only load our gateway settings if gatewayprofileusagemethod
is set to 1. Otherwise it will always set the option "Auto-detect RD
Gateway server settings" and ignore the other gateway settings in the
rdp file.
2020-11-13 11:44:19 +01:00
Martin Fleisz
60317154a3 client/common: Several fixes for the rdp file parser
This PR fixes various issues in the rdp file parser:
- NetworkAutoDetect was written inverted
- GatewayHostname was missing the port info (if not default)
- Several settings were left out when populating the file struct
2020-11-12 18:13:12 +01:00
Martin Fleisz
69c8926de9
Merge pull request #6563 from akallabeth/backtrace_sig
Added stack trace on signal.
2020-11-10 10:32:39 +01:00
akallabeth
dfbf300389 Conservative keyboard state sync, refactored input API 2020-11-10 10:26:41 +01:00
akallabeth
cf49e4bfa8 Added stack trace on signal. 2020-11-10 10:17:56 +01:00
Martin Fleisz
fcbe7010ce
Merge pull request #6562 from akallabeth/warning_fixes
Fixed compilation warnings.
2020-11-10 09:13:23 +01:00
akallabeth
2e5280feec Fixed possible out of bound access in usb channel. 2020-11-10 09:02:35 +01:00
akallabeth
66dc4cc9ee Fixed compilation warnings. 2020-11-10 08:53:43 +01:00
David Fort
03a365f817
Merge pull request #6561 from akallabeth/suse_warning_fix
Fixed #6560: Missing return value.
2020-11-09 21:28:55 +01:00
akallabeth
dc392dea3e Fixed #6560: Missing return value. 2020-11-09 17:24:27 +01:00
Martin Fleisz
dc88b19d18
Merge pull request #6558 from akallabeth/drdynvc_lock_fix
Clean up drdynvc channels porperly locked.
2020-11-09 09:25:27 +01:00
odednoam
88102275f0
Bugfix: when freerdp_assistance_parse_file_buffer was called from external code, it did not copy the access password to the rdpAssistanceFile struct. (#6550)
* Fixed bug with assistance buffer parsing: `freerdp_assistance_parse_file_buffer` may be called directly, not necessarily from `freerdp_assistance_parse_file`, so password should be saved to the `rdpAssistanceFile` in `freerdp_assistance_parse_file_buffer`.
2020-11-09 09:19:53 +01:00
akallabeth
7f1cca78aa Clean up drdynvc channels porperly locked. 2020-11-06 13:38:47 +01:00
Martin Fleisz
c5f746d71a
Merge pull request #6556 from akallabeth/autoreconnect_fix
Fixed reset of MessageQueue in Clear
2020-11-06 13:13:18 +01:00
akallabeth
59ef9a7e8b Fixed reset of MessageQueue in Clear 2020-11-06 13:02:01 +01:00
akallabeth
6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
Martin Fleisz
96bb569674
Merge pull request #6551 from akallabeth/queue_fix
Reset Queue_Event when Queue_Clear is called.
2020-11-05 15:43:48 +01:00
akallabeth
a5989429f7 Reset Queue_Event when Queue_Clear is called. 2020-11-05 15:32:17 +01:00
Martin Fleisz
b5fa928311 core: Fix race when deleting channel manager
This PR fixes a possible crash when the channel manager was freed and
there were pending messages in the message queue.
The problem was that even though the message queue already received the
WMQ_QUIT message, it was still possible to enqueue messages after this
point. This resulted in unprocessed messages in the queue when it was
deleted. The delete handler then called into channel handlers which
where aleady freed/deleted.
With this PR adding messages after WMQ_QUIT was posted to the message
queue returns an error and all channel messages are now processed before
the channels are closed/terminated.
2020-11-03 17:08:58 +01:00
Martin Fleisz
81e79a8bac
Merge pull request #6543 from akallabeth/pool_fix
Fixed locking issue, removed broken functions
2020-11-02 11:09:23 +01:00
akallabeth
516fc9b910 Fixed locking issue, removed broken functions 2020-11-02 09:23:11 +01:00
Martin Fleisz
e72c35447c
Merge pull request #6541 from akallabeth/streampool_lock_fix
Unify StreamPool locking.
2020-10-30 10:42:04 +01:00
akallabeth
0f2a8f214a Unify StreamPool locking. 2020-10-30 10:17:27 +01:00
Armin Novak
d7bf6553c5 Added option to remap scancodes 2020-10-29 18:44:32 +01:00
Martin Fleisz
cec261c4db Cleanup internal channel management
This PR gets rid of some unneeded/unused field and functions in the
channel handling code. It also makes it possible to call
VirtualChannelWrite from any thread like the Windows API allows. The
only restriction is that the channel must be initialized
(VirtualChannelInit) from the same thread that called freerdp_connect.
2020-10-29 15:53:32 +01:00
Martin Fleisz
c47b15945b
Merge pull request #6499 from akallabeth/leak_fixes
Fixed leak on cursor update.
2020-10-29 12:08:16 +01:00
Martin Fleisz
80cba204c0
Merge pull request #6521 from akallabeth/mac_fixes
Mac fixes
2020-10-28 09:55:20 +01:00
Martin Fleisz
e1d7f6111c
Merge pull request #6535 from akallabeth/mac_mouse
Fix for mac mousewheel.
2020-10-28 09:47:16 +01:00
Martin Fleisz
7be04e212b
Merge pull request #6466 from akallabeth/memsan
Memsan: fixes (most) unit tests for use with memory sanitizer
2020-10-28 09:46:12 +01:00
Keith Johnston
c0ecee9d69 Fix for mac mousewheel.
(cherry picked from commit 87a4a8484e)
2020-10-28 08:17:53 +01:00
akallabeth
6e5f5de439 Do not abort disc hotplug if no access to mount tab. 2020-10-27 15:45:56 +01:00
akallabeth
896b7bc711 Added support for xwayland keyboard grab 2020-10-27 15:45:44 +01:00
Armin Novak
11ca443aaf Fixed NtStatus2Tag return. 2020-10-27 07:41:04 +01:00
akallabeth
55b95769d0 Fixed #6518 2020-10-21 19:48:27 +02:00
Armin Novak
a2e9f5efcb Fixed mac app termination and warnings 2020-10-21 19:44:09 +02:00
Armin Novak
0e0eb5f41f Added permission checks for mac audio backend. 2020-10-21 19:44:09 +02:00
Martin Fleisz
e18597f5eb
Merge pull request #6516 from akallabeth/tumbleweed
Fix warning #6515
2020-10-16 08:27:25 +02:00