Commit Graph

1092 Commits

Author SHA1 Message Date
Armin Novak e650fdb2b6 Bugfixes. 2016-10-06 13:43:02 +02:00
Armin Novak 9d5ca34d0d Fixed pointer initialisation for X11. 2016-10-06 13:43:02 +02:00
Armin Novak 04fb4e4e4c Fixed rectangle clipping and warnings. 2016-10-06 13:43:02 +02:00
Armin Novak c229a1939d Updated codec API, unified drawing order color decoding. 2016-10-06 13:43:02 +02:00
Armin Novak bc8217ed42 Removed palette, using GDI one. 2016-10-06 13:43:01 +02:00
Armin Novak 8fffda5740 Fixed clearcodec and codecs reset. 2016-10-06 13:43:01 +02:00
Armin Novak 9fc8dc6b5d Removed gdi->codecs, unused. 2016-10-06 13:43:00 +02:00
Armin Novak a6cef5cde7 Fixed GFX related issues. 2016-10-06 13:43:00 +02:00
Armin Novak e860fde4bc Fixed function arguments. 2016-10-06 13:43:00 +02:00
Armin Novak 03907c82a9 Fixed issues. 2016-10-06 13:43:00 +02:00
Armin Novak d98677094e Fixed warnings. 2016-10-06 13:43:00 +02:00
Armin Novak 716c5c53e9 256 color support. 2016-10-06 13:42:59 +02:00
Armin Novak 48d1b4ee13 Fixed color ordering for GDI. 2016-10-06 13:42:59 +02:00
Armin Novak ac8c72238d Api update. 2016-10-06 13:42:59 +02:00
Armin Novak da956e0388 ... 2016-10-06 13:42:59 +02:00
Armin Novak 24599af991 More color fixes. 2016-10-06 13:42:58 +02:00
Armin Novak df35c135d1 Fixed color conversion, unified GFX and updated API. 2016-10-06 13:42:58 +02:00
Nathan Kidd 24aa71e6cb client/X11: Only upconvert < 24 bit RFX tiles
Fixing this logical typo gives a slight performance boost /
CPU usage reduction on heavy loads.
2016-09-23 21:26:56 -04:00
David Fort 1fdcae9a6a Add an environment variables section to the man 2016-06-21 15:28:38 +02:00
David Fort 0905cc2ba7 man pages needed love
This patch cleans things up so that generated man pages for argument are nicer.
2016-06-21 09:49:44 +02:00
Norbert Federa 374f97aad3 client/x11: don't close locked mutex 2016-06-07 19:01:03 +02:00
zihao.jiang e7d9e91864 channels/rdpgfx: Make freerdp_client_codecs_prepare calls codec reset. It fix broken h264 client from #3328. Also it doesn't make sense that we don't need width and height for codec initialization while we need them for codec reset 2016-05-30 02:00:05 +08:00
Bernhard Miklautz 8cb873b054 client/X11: fix build without client interface
Fix build when -DWITH_CLIENT_INTERFACE=OFF is used.
2016-05-03 10:44:42 +02:00
Bernhard Miklautz 783807229d build: add missing dependencies
Add all missing dependencies found with --no-undefined. Since
dependencies aren't exported anymore (if not required) it is no necessary
to explicitly list all required libraries.
2016-04-07 15:10:00 +02:00
Bernhard Miklautz 9e8c6c99b6 First shot on fixing over linking
If a target is linked against libraries with cmake
(target_link_libraries) and the libraries are not marked as PRIVATE
they are "exported" and in case a other target is linked against this
target it is also linked against *all* (not private) libraries.

Without declaring private libraries PRIVATE a lot of over linking
(linking against unneeded libraries) was done.
2016-03-29 18:14:34 +02:00
Armin Novak 5bc333c626 Implemented GFX AVC444 support. 2016-03-16 13:43:18 +01:00
Armin Novak 3a3ec85898 Unified RDPGFX_RECT16 and RECTANGLE_16 2016-03-16 13:43:17 +01:00
Armin Novak 36cbf1b583 Fixed error handling for channel load failures. 2016-03-14 13:13:43 +01:00
Martin Fleisz 66ae3f2c77 Merge pull request #3177 from akallabeth/codec_reset_fix
Fixed codec reset, now resetting resolution too.
2016-03-11 11:22:59 +01:00
Norbert Federa ef4b29e5b3 ConvertFromUnicode fixes and misc hardening
- Added missing ConvertFromUnicode checks
- If ConvertToUnicode allocates memory, guarantee the null termination
  similar to ConvertFromUnicode's implementation
- Fixed some TestUnicodeConversion.c CTest return values
- Added some CTests for ConvertFromUnicode and ConvertToUnicode
- Misc code and protocol hardening fixes in the surrounding code regions
  that have been touched
2016-03-03 16:56:19 +01:00
Armin Novak 8997c6c03a Added log messages for unsupported surface commands. 2016-03-02 14:46:33 +01:00
Armin Novak 2e110c7f35 Fixed codec reset, now resetting resolution too.
H264 and others require the surface resolution to work properly.
This initializes the codecs and the resolution on reset.
2016-03-02 14:46:33 +01:00
akallabeth 05aa425cae Merge pull request #2851 from ilammy/x11-cliprdr/improve-format-support
Improve clipboard format support in X11 client
2016-02-23 09:56:17 +01:00
ilammy 93fc349ce6 client/X11: harden xf_cliprdr_parse_server_format_list()
* Make sure that numFormats has reasonable value

This will help catching errors like writing -1 as an unsigned number
of formats into the serialized stream, or trying to read the property
after someone else erroneosly messed with it, or other similar mistakes
which would result into reading and then sending garbage to the server.

We read the list xf_cliprdr_get_raw_server_formats() from an X window
property. Properties generally cannot be larger than 4 KB and each
format requires at least 5 bytes (most of them are named, though),
which gives us 512-ish limit on the number of formats we can squeeze
into the property.

However, it's hard to find an application that provides more than
20 formats (I've seen like 15 for MS Office apps), thus I believe
we can safely assume than anything that does not fit into a byte
means that we are reading garbage rather than a good format list.

* Check for the end of stream when reading format names

This also prevents reading garbage and getting segmentation faults
and Valgrind warnings when somebody somewhere sometimes forgets to
put a terminating null character where it belongs.

strnlen() and strndup() functions are provided by POSIX.1-2008
which we can reasonably expect to be available in 2016.
2016-02-23 01:20:34 +02:00
Armin Novak b35f6658b9 Moved common code from cli clients to client lib. 2016-02-05 02:05:37 +01:00
Armin Novak cbf2892ccc Implemented temporary certificate accept.
Certificates can now be accepted temporarily.
The callbacks for certificate validation have been
modified to extend the information presented to the user.
2016-02-05 02:04:57 +01:00
Martin Fleisz 2db8c7e107 Merge pull request #3052 from abma/fix3051
fix #3051: fullscreen switching with CTRL+ALT+ENTER doesn't work any …
2016-01-15 09:51:51 +01:00
Armin Novak e7c8ea4db9 Fixed memory leak. 2016-01-15 09:33:21 +01:00
abma ba286684c4 fix keyboard release (thanks hardening!) 2016-01-15 01:59:08 +01:00
abma bedb4a2d64 fix #3051: fullscreen switching with CTRL+ALT+ENTER doesn't work any more 2016-01-13 23:05:32 +01:00
Bernhard Miklautz 6fa3608111 cleanup cmake exports and pkg-config files
With this commit the "exported" components (usable with pkg-config and
cmake find module package)
* winpr - winpr library and headers
* freerdp - core library and headers
* freerdp-client - client specific library
* freerdp-server - server specific library
* rdtk - rdtk headers and library

To allow the installation of multiple different version (different major
number) the include files were moved into the respective sub folder:
freerdp -> freerdp{MAJOR}/freerdp (currently freerdp2/freerdp/)
winpr -> winpr{MAJOR}/winpr (currently winrp1/winpr/)
rdtk -> rdpk{MAJOR}/rdtk (currently rdtk0/rdtk/

The generated pkg-config and cmake find modules now also include the major
version number. Currently the following pkg-config are generated and
installed.
* winpr1
* freerdp2
* freerdp-server2
* freerdp-client2
* rdtk0

As cmake is able to handle multiple versions out of the box the
following can be used to find a specific module:

find_package(WinPR)
find_package(FreeRDP)
find_package(FreeRDP-Server)
find_package(FreeRDP-Client)
find_package(RdTk)

As cmake doesn't automatically resolve dependencies for packages it is
necessary to manually include the requirements. For example if
FreeRDP-Client is required WinPR and FreeRDP need to be included
(find_package) as well.

This commit also fixes the installation when STATIC_CHANNELS are built.
WITH STATIC_CHANNELS all channels are linked into libfreerdp-client, for
this all channels are generated as linker archive and linked together in
the final step. Before the intermediate linker archives were, although
not required and useful, installed. Same applies for server side
channels.
2016-01-12 17:32:33 +01:00
Roland Kaufmann 600d3c5ccb Add option to disable pointer button mapping
In case the old behaviour of not reverse-mapping the mouse buttons is
desirable, a command-line option is added to disable the mapping. This
option is made experimental for the time being.

The default is to do the reverse mapping, as this is the intuitive
behaviour (the mouse then works as it would on the console).
2015-12-15 17:42:57 +01:00
Roland Kaufmann 9f43291126 Get pointer button mapping from input system
If XInput extension is available, then find the (first) pointer device
and use the button mapping of that one. If there are more than one
pointer devices, they could have different button mappings, but it is
not clear how this should be communicated to the RDP server.

If XInput is not available, attempt to fallback to the old global
mapping. (This mapping exists, but is not correct if there actually
is an XInput extension loaded, as it is then not used).
2015-12-15 17:42:05 +01:00
Roland Kaufmann 6ca8962045 Map logical to physical mouse button events
RDP expects to receive an indicator of the physical mouse button that
was pressed on the client, whereas X11 deliver a value for which
logical mouse button that was pressed.

This patch introduces a (reverse) mapping from logical mouse buttons to
physical mouse buttons, so that the RDP server can do correct mapping
for the event on its end.

However, no actual mapping is done here; this patch just introduces the
framework to do so. Thus, there should be no behavioural change from
this patch alone.

There is an implicit assumption that only the first three buttons are
mapped to eachother. Enabling more a general mapping would require
extensive changes to the event handling as fourth logical button and
up is used for special functionality such as wheel.
2015-12-15 17:42:05 +01:00
Binyamin Sagal 23fea1615f Fix horizontal scrolling direction and capability detection 2015-12-14 21:48:31 +02:00
Armin Novak a5db7117c8 Implemented horizontal wheel support.
Horizontal mouse wheel input capabilities are now checked
and if available mouse buttons 6 and 7 are mapped to the
horizontal wheel for the X11 client.
2015-12-14 18:29:23 +01:00
Binyamin Sagal d81784cec6 remove horizontal scroll maping to forward/back
partal fix for #2302
2015-12-14 18:01:04 +01:00
Hardening 57fe581b16 Merge pull request #2824 from bjcollins/nla_auth_exit_code
Return FREERDP_ERROR_AUTHENTICATION_FAILED on an authentication failure
2015-12-08 22:46:29 +01:00
ilammy 7bce7ef372 client/X11: transfer raw clipboard format data
The second step of raw transfer is to transfer the format data itself.
This has been already implemented in XFreeRDP before, but several
tweaks are required for it to work correctly.

The idea of raw data transfer is to request for _FREERDP_RAW clipboard
format while putting the actual formatId into _FREERDP_CLIPRDR property
where the requested data is expected to arrive to. Then the clipboard
owner will check for the real formatId and deliver the expected data.

This stays true, but the check is performed in a more straightforward
way, and CF_RAW format (numerically equal to zero) is not considered
an unknown destination format when performing (identity) conversions
with wClipboard. This is not an issue because wClipboard will allow
only identity conversion for CF_RAW, it will fail if something else
is going to be converted into CF_RAW.
2015-11-14 19:03:10 +02:00
ilammy 391ed0d91d client/X11: transfer raw clipboard format lists
The first part of raw transfer sequence is to transfer the format
list of the session A into the session B. Then we will be able to
request/reply with raw data using proper format IDs.

xf_cliprdr_server_format_list() of the session A now exposes the
raw server format list. As soon as the list is received, it is
serialized and put into _FREERDP_CLIPRDR_FORMATS property.

xf_cliprdr_get_requested_targets() of the session B now checks
whether the clipboard owner is a FreeRDP session with enabled
raw transfer capability. If it is, the raw format list is simply
extracted from _FREERDP_CLIPRDR_FORMATS of the clipboard owner.
Otherwise, the format list is populated from the usual TARGETS
clipboard format.
2015-11-14 19:03:10 +02:00