Commit Graph

147 Commits

Author SHA1 Message Date
akallabeth 3d38d2636c Decreased logging verbosity for INFO level 2022-03-04 09:34:02 +01:00
Armin Novak 4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
akallabeth 7641710f60 Use a client/common context component
* Allows moving common client code from specific client to a
  generic client/common implementation
2022-02-22 09:44:13 +01:00
akallabeth 8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
akallabeth 4a4d783d4f
Moved clipboard custom context checks to implementation (#7501) 2021-12-17 13:47:20 +01:00
jackyzy823 90b1b3d540 x11: Add size in xf_cliprdr_fuse_getattr resopnse 2021-11-25 12:24:50 +01:00
Armin Novak 673fb46836 Fixed uninitialized warnings 2021-09-10 08:16:25 +02:00
Armin Novak 5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
akallabeth 8d82adb28a Fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak 216f65336e Fixed HashTable and ArrayList use errors 2021-06-16 11:46:42 +02:00
Armin Novak c2bef2bfa9 Fixed return value checks for ArrayList_Append and HashTable_Insert 2021-06-16 11:46:42 +02:00
Armin Novak d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak 880c603c26 Renamed HashTable_Add to HashTable_Insert
* Since the changes break HashTable_Add rename it so that it will
  not fail silently
2021-06-16 11:46:42 +02:00
Armin Novak cb642699c8 Modified HashTable API to be opaque
* Reuse wObject function pointers
* Add missing getters/setters
* Clean up return types, const correctness of arguments
2021-06-16 11:46:42 +02:00
akallabeth 6b36c6d417
Replace fopen and path functions with wrappers (#7043)
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
akallabeth 9f573a1b40 Fixed #6938: Remote app mode clipboard fix
In remote app mode the _FREERDP_TIMESTAMP_PROPERTY does not work.
Therefore ignore it
2021-04-16 11:18:00 +02:00
Armin Novak 1fa0b80f7f Removed nautilus clipboard file hack
This prevents remote to properly paste text
2021-03-10 15:48:58 +01:00
Armin Novak df785f7b77 Refactored X11 clipboard 2021-03-10 15:48:58 +01:00
akallabeth 1dae0552d7 Fixed various warnings 2021-02-16 16:28:57 +01:00
akallabeth a51f4ccaaa Filter out duplicate ClientFormatList announcements 2021-01-25 10:34:11 +01:00
akallabeth 2efb7d9274 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.
2021-01-25 10:32:50 +01:00
akallabeth f3dad4106a Fixed support for huge files in clipboard 2021-01-25 08:43:46 +01:00
akallabeth 4ca2090f03 Return ENOENT if fuse_ino_t is not found 2021-01-18 19:13:56 +01:00
Armin Novak 78435c2eea Added missing errno.h include 2021-01-18 19:13:56 +01:00
jackyzy823 b972d70a9e x11: refactor fuse code 2021-01-18 19:13:56 +01:00
jackyzy823 7f043ebb52 x11: update cmake file to build with fuse2/fuse3 or without fuse 2021-01-18 19:13:56 +01:00
jackyzy823 1de1f113ed x11: more error handling for remote to local file copy 2021-01-18 19:13:56 +01:00
jackyzy823 a61c185d30 x11: implement all related code to file content request for size and FD_WRITESTIME flag in response , fix include dir for fuse 2021-01-18 19:13:56 +01:00
jackyzy823 d537988f28 x11: add support for remote to local clipboard file copy 2021-01-18 19:13:56 +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 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
akallabeth f282c55c7a Added clipboard CB_HUGE_FILE_SUPPORT_ENABLED flag 2020-09-29 09:03:49 +02:00
akallabeth 1546a8b655 Fixed naming of FILEDESCRIPTORW 2020-09-18 12:49:54 +02:00
akallabeth cbee45aace Fixed clipboard 'called with invalid type' warning 2020-05-06 13:31:57 +02:00
LatinSuD a6ccd38b68 Free clipboard respond to fix bug
Fixes #5997 (clipboard stops responding in the middle of a session)
2020-03-27 09:13:38 +01:00
Armin Novak ba5400f110 X11 XEvent clipboard processing cleanup
* Use const X*Event where possible
* Helper functions use the actual type as argument
2020-03-04 10:38:41 +01:00
Armin Novak 72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01: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
Armin Novak d69ad3ee59 Fixed missing NULL check. 2019-09-03 08:56:59 +02:00
Armin Novak cbb9354641 Fix broken clipboard after file copy 2019-07-17 15:13:50 +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
sgtatham 236c7918cb xf_cliprdr: detect null terminators more reliably. (#5353)
Clipboard formats containing plain text are specified to be terminated
by a \0 character in MS's documentation on standard clipboard formats:
https://docs.microsoft.com/en-us/windows/desktop/dataxchg/standard-clipboard-formats

xf_cliprdr_server_format_data_response receives pasted data from the
server to transfer to the client, in a sufficiently raw form that the
\0 terminator is still present, so it has to remove it. It does so by
checking only at the very end of the data. But I've observed that when
pasting out of at least one Windows program (namely Outlook 1903 on
Windows 10), the intended paste data arrives in this function followed
by \0 and then a spurious \n. In that situation the null-terminator
removal will fail to notice the \0, and will leave both bogus
characters on the end of the paste.

Fixed by using memchr to find the _first_ \0 in the paste data, which
should not lose any actually intentional data because it's in
accordance with the spec above.
2019-04-25 10:54:10 +02:00
Armin Novak 05901280fe Fixed unused argument warnings. 2019-04-05 09:14:35 +02:00
Armin Novak e009a62f06 Fixed sign-compare warnings 2019-04-05 09:14:35 +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 087390b303 Refactored client clipboard function callbacks for const data pointers. 2019-01-23 16:55:13 +01:00
Armin Novak 13478c7445 Skip empty server format response. 2018-09-24 12:47:46 +02:00
Armin Novak 3a54713103 Fixed invalid argument parameter 2018-05-02 13:08:30 +02:00
Armin Novak a1c3c1ad64 Added proper return value checks for clipboard data. 2018-05-02 09:21:42 +02:00