Commit Graph

1293 Commits

Author SHA1 Message Date
ilammy ac2b13fdcc client/X11: do not fixup HTML data length
The data provided by local applications can be actually encoded in
UTF-16 (e.g., Firefox does this to HTML). UTF-16 allows embedded null
bytes so we should not use strlen() to fix up the data. The HTML format
synthesizer can handle trailing null bytes just fine and can detect
whether it deals with UTF-8 or UTF-16.
2017-05-31 05:01:30 +03:00
ilammy 34b092058f x11/cliprdr: make callbacks static
Most of the functions is this file are internal-use callbacks so they do
not need to be exported from the compilation unit. Mark functions static
as appropriate.
2017-05-24 23:05:42 +03:00
David Fort 17a4e95a5b Drop some annoying warning
Probably that some unused functions should be removed, but at least it makes
it compile with no warnings.
2017-05-12 13:54:16 +02:00
Armin Novak b1d631f1e5 Added support for Set Keyboard IME Status 2017-05-12 09:43:58 +02:00
David Fort d170c10ee6 Fix H264 in multi monitor case
The H264 context is surface specific, so in multi-monitor (with multiple surfaces)
the decoding was failing. This patch fixes that by introducing a surface specific
h264 context.
2017-05-02 18:39:33 +02:00
ilammy 82f3abac49 client/X11: teach RAIL to use clipboard redirection
XSelection protocol does not define any global clipboard as there is on
Windows. Instead each window has its own property for clipboard content
(like CLIPBOARD or PRIMARY) and there is a global notion of clipboard
ownership.  Only one window can claim ownership of some clipboard type
at the moment.

FreeRDP uses CLIPBOARD for clipboard transfers (it's the one used by
applications when Ctrl+V is pressed). For regular desktop sessions the
session window itself is used for clipboard interactions via
xfc->drawable field. However, for remote app session there is no session
window. We cannot use the current remote app window as it may change or
be destroyed without closing the session. We also cannot use the root
window as it is already used for CF_RAW transfer protocol.

Therefore we create a simple dummy window to put into xfc->drawable for
this exact job: to act as a clipboard vessel on behalf of the entire
remote app session.

xf_create_window() usually creates the window as we immediately start in
RAIL mode when possible. xf_rail_enable_remoteapp_mode() is invoked only
when autologin failed or remote desktop had to show the session window
to the user for some reason.
2017-05-01 02:10:55 +03:00
Shaun Maher b547386498 WS_EX_NOACTIVATE treated as unmanaged\nWindows that carry the WS_EX_NOACTIVATE are treated the same as WS_EX_TOOLWINDOW in that they should not be handled as normal windows by the X window manager. The prevents an issue with MS Outlook 2013 (and probably other applications) where attempting to resize the vertical columns causes some sort of WS_EX_NOACTIVATE window to be created which steals focus and aborts the resizing action. 2017-04-22 18:44:37 +10:00
Norbert Federa 263348ff2b client/x11: fix gfx drawing bug with /multimon
The surface's damage region is not relative to the output but
lives in its own universe starting at origin 0,0.

Also fixed the drawing coordinates used in the XRENDER code path
which is used with /smart-sizing
2017-04-11 12:30:37 +02:00
ilammy b9ab82214a x11/cliprdr: negotiate file streaming support
Now that we've got everything in place to handle files it's time to tell
the server that we can actually do this.

MS-RDPECLIP 3.2.5.1.3 Sending a Client Clipboard Capabilities PDU asks
us politely to not advertise file clipping support if the server did not
do that itself. Thus we need to parse the capabilities sent by the
server and take a note whether it supports file clipping.

There is also no point in advertising file clipping support if
wClipboard failed to initalize any local file subsystem, in which case
we cannot handle files for real. Take a note of this as well when we
register the file formats.

If everthing is really in place and the stars shine upon us then we are
allowed to set CB_STREAM_FILECLIP_ENABLED in the capabilities. There is
no command line switch to disable file clipping (and there is little
reason to), so we always support it if we can.

We also set an additional flag CB_FILECLIP_NO_FILE_PATHS flag in the
capabilities because it seems to be necessary for the server to send the
"FileGroupDescriptorW" format to us. Otherwise the server will only send
the old CF_HDROP format which can't be handled well without enabled disk
drive redirection and a properly negotiated server-side temporary
directory.
2017-04-09 03:15:49 +03:00
ilammy 401bf8b0af x11/cliprdr: provide file content to the server
xf_cliprdr_server_file_contents_request() handles the
CLIPRDR_FILECONTENTS_REQUEST which is sent by the server to retrieve the
size or data of a single file. The server can only request one of these
things at a time, do confirm this.

The actual handling of the requests is done by wClipboardDelegate. In
order to handle its resposes we register a bunch of our own callbacks
which simply pass the responses to the server.

In case of an error we should always send a CB_RESPONSE_FAIL to the
server. If we do not then the file transfer progress dialog may end up
hanging in the remote session forever until the user logs out or kills
explorer.exe. We do wnat this.
2017-04-09 03:15:49 +03:00
ilammy 5fb89985f0 x11/cliprdr: handle text/uri-list format
To handle a new format we should first be able to transform the format
name from the local clipboard owner into its remote representation. In
our case this will be trasforming the "text/uri-list" target into the
"FileGroupDescriptorW" named format.

Add CB_FORMAT_TEXTURILIST to identify the local format by its ID during
the data conversion step. This numeric ID has nothing to do with the ID
which will be sent to server. It's a bit weird, but that's how XFreeRDP
works.

After that add a new client format with this ID and appropriate local
and remote format names (in atom and formatName fields respectively).
Do this only if wClipboard actually supports "text/uri-list" format.
(It could fail to initialize the local file subsystem, in which case
it will fail all file-related requests and there would be no point in
advertising the file format support in the first place.)

Finally, handle the actual format data request for a new named format
in xf_cliprdr_process_requested_data(). Remember to convert the
FILEDESCRIPTOR array we receive from wClipboard into the
CLIPRDR_FILELIST expected by the server. Also take care to not leak
memory during this conversion.

Note that this handles only the CLIPRDR_FORMAT_DATA_REQUEST. The server
is still not able to retrieve the file content as this is done via a
separate request-reply sequence.
2017-04-09 03:15:49 +03:00
ilammy 96fe94c85f x11/cliprdr: impove error handling
Unify error handling in xf_clipboard_new() by using a common cleanup
code path. This fixes a leak of clipboard->system and format names when
an error occurs during initialization.

Also reformat the code to fit into 100 column limit without this line
break insanity and with improved readability.

I do not particularly like to use a variable with such a descriptive
name 'n' far away in the error handling part, but its short name is
kinda important for readability so let's keep it as is.
2017-04-09 03:15:49 +03:00
Armin Novak 850d7fbc38 Update changed rectangles instead of extent. 2017-03-30 18:17:21 +02:00
Armin Novak 197378975b Let bitmaps keep XBitmap during lifetime. 2017-03-28 12:14:19 +02:00
Armin Novak 73bf4547a5 X11 GFX: Restrict to region, ignore alpha
* Restrict the screen update to the changed region
* Ignore differences in color format alpha
2017-03-28 12:14:19 +02:00
Armin Novak d46d0c3d4a Fixed invalid return from xf_rail_window_icon 2017-03-28 11:47:46 +02:00
Norbert Federa fa2086686b some performance fixes
- draw only the updated region in the gdi and x11 surface bits implementation
- don't repeatedly call IsProcessorFeaturePresentEx in rfx rlgr decoder
- fix ugly and unaligned profiler print layout and remove an unnecessary value
2017-03-27 20:14:13 +02:00
Armin Novak 8c687611af Print logon error info. 2017-03-17 13:48:32 +01:00
Mariusz Białończyk 3e8446f11b Manual: remove a space in examples 2017-03-06 14:28:30 +01:00
Armin Novak b2c29158be Scanbuild warning, argument checks and leak fixes.
* Added Stream_GetRemainingCapacity to check remaining stream size
  before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
Bernhard Miklautz 23cfd34525 Merge pull request #3746 from volth/command-line-action-script-rebased
Add command line option to override action script path
2017-02-20 14:08:14 +01:00
akallabeth ba99e35f72 Merge pull request #3733 from chipitsine/master
Resolve issues detected by cppcheck
2017-02-17 10:46:35 +01:00
Ilya Shipitsin 9b12feb237 an argument check in xf_UpdateWindowArea 2017-02-17 13:38:05 +05:00
Armin Novak 198bc6d9e1 Fixed compiler warnings. 2017-02-16 13:17:49 +01:00
Martin Fleisz 0d43201e3c Merge pull request #3767 from akallabeth/ssse3_optimize
Ssse3 optimize and sanitize address
2017-02-16 09:51:28 +01:00
Armin Novak 03abaf1aee Align scanline to multiple of 16, required for ASM 2017-02-15 12:08:32 +01:00
ilammy 11c55f8dcd client/X11: cache original clipboard data for raw transfers
FreeRDP uses clipboard->data to cache the result of the Windows->X11
clipboard format conversion, and xf_cliprdr_process_selection_request()
immediately provides this result to local applications if they request
the same clipboard format again. This saves us a possibly costly
conversion in case where the user pastes data repeatedly.

However, this caching mechanism did not support raw clipboard transfers
where the unmodified data is passed between two FreeRDP clients. We use
the same XClipboard protocol for this, so the clipboard->data is in play.
We clear the cached value when we receive new data from the server, so
initially raw transfers are fine. But if some local application (e.g.,
a clipboard manager) asks for some data format before the data is pasted
into the second FreeRDP session then clipboard->data will contain the
*converted* data. And this converted cached data will be provided to
the second FreeRDP session as a part of the raw data transfer. Instead
we should have provided the original data.

In order to achieve this we are now caching the original data in the
same way as the converted one, and the original data is now correctly
provided when the second FreeRDP session asks for a raw data transfer.
2017-02-11 00:48:36 +02:00
Volth e7487cea27 Add command line option to override action script path 2017-02-08 08:30:24 +00:00
Armin Novak df764f5aad Fixed GDI color decoding issues. 2017-02-01 11:02:23 +01:00
Ilya Shipitsin 0a3bd2af4d Remove redundant condition
[client/X11/xf_rail.c:205] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow.
[client/X11/xf_rail.c:206] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow.
[client/X11/xf_rail.c:207] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow.
[client/X11/xf_rail.c:208] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow.
[client/X11/xf_rail.c:215] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow.
[client/X11/xf_rail.c:216] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow.
[client/X11/xf_rail.c:217] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow.
[client/X11/xf_rail.c:218] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow.
2017-01-31 14:10:58 +05:00
Ilya Shipitsin 12f5368819 make cppcheck even more happier:
[channels/tsmf/client/gstreamer/tsmf_X11.c:317] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:322]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:470] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:472] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/tsmf_media.c:179] -> [channels/tsmf/client/tsmf_media.c:181]: (warning) Either the condition '!stream' is redundant or there is possible null pointer dereference: stream.
[client/Windows/wf_cliprdr.c:2219] -> [client/Windows/wf_cliprdr.c:2222]: (warning) Either the condition '!formatDataResponse' is redundant or there is possible null pointer dereference: formatDataResponse
[client/Windows/wf_cliprdr.c:2445] -> [client/Windows/wf_cliprdr.c:2448]: (warning) Either the condition '!fileContentsResponse' is redundant or there is possible null pointer dereference: fileContentsResponse.
[client/X11/xf_cliprdr.c:911] -> [client/X11/xf_cliprdr.c:913]: (warning) Either the condition '!clipboard' is redundant or there is possible null pointer dereference: clipboard.
[client/X11/xf_graphics.c:504] -> [client/X11/xf_graphics.c:506]: (warning) Either the condition '!xfc' is redundant or there is possible null pointer dereference: xfc.
[libfreerdp/core/transport.c:861] -> [libfreerdp/core/transport.c:863]: (warning) Either the condition '!transport' is redundant or there is possible null pointer dereference: transport.
[server/shadow/shadow_server.c:777] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:778] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:779] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:781] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:782] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:783] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:784] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:785] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:787] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:789] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
2017-01-26 14:44:19 +05:00
Armin Novak 052736a825 Fixed conversion to XColor. 2017-01-25 08:34:23 +01:00
Armin Novak 042594bf82 Fixed stride for XCreateImage. 2017-01-25 08:34:16 +01:00
Armin Novak 6ceb574402 Fixed staging surface scanline. 2017-01-23 11:32:25 +01:00
Armin Novak b32c241b9f Fixed color format selection for 16bpp 2017-01-23 11:32:25 +01:00
Armin Novak 0acc54a4f7 Fixed scanline for RFX. 2017-01-23 11:30:56 +01:00
Bernhard Miklautz d817469b78 Install man pages
* man pages are only build/installed if WITH_MANPAGES is enabled
* create a new cmake function install_freerdp_man to unified install man
  pages
* install all man pages using the new function
* update the nightly packages accordingly
2017-01-16 11:34:32 +01:00
akallabeth 9e636f2d71 Merge pull request #3622 from khvMX/master
Ungrab keyboard feature for X11
2017-01-11 16:31:15 +01:00
Armin Novak 085ee3ac0f Fixed patblt for mono color. #3678 2017-01-09 15:25:47 +01:00
Armin Novak 03adbd24a8 AutoReconnect support unlimited retries. 2017-01-09 12:34:09 +01:00
Viktor Mukha d129102e4c X11 ungrab keyboard only if RightCtrl is released right away 2016-12-20 10:59:45 +01:00
Viktor Mukha b99a697796 X11 will ungrab keyboard when RightCtrl is pressed 2016-12-16 14:15:47 +01:00
Norbert Federa f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Martin Fleisz 2b9165466d Merge pull request #3648 from akallabeth/clear_codec_fixed
Clear Codec and AVC420 fixes
2016-12-15 16:02:05 +01:00
Armin Novak f0203900d7 Fixed +auto-reconnect (#3650) 2016-12-15 12:10:11 +01:00
Armin Novak 514a33d435 Respecting color depth with RDP_CODEC_ID_NONE. 2016-12-07 13:22:52 +01:00
Armin Novak d4b823d5cb Using a single codec context per session. 2016-12-07 13:22:00 +01:00
akallabeth ac9e7530d3 Merge pull request #3637 from mfleisz/rfx_api_simplify
codec: Remove src format parameter from rfx_process_message
2016-12-02 09:38:33 +01:00
Martin Fleisz e059e3dea3 codec: Remove src format parameter from rfx_process_message
This parameter is not required. Default param is BGRX32
and if an other format is required rfx_codec_set_pixel_format
can be used.
2016-12-01 17:21:06 +01:00
Bernhard Miklautz c82cd6cb57 Fix issues in wlog man page
* fix spelling errors
* move man page from section 1 to section 7
* fix the man page header to match the actual section
* adapt the packages for wlog.7

Fixes #3632
2016-12-01 15:36:31 +01:00
Norbert Federa c6e6b44143 countless WLog/printf format specifier fixes 2016-11-25 17:06:25 +01:00
Martin Fleisz 9e474b43d1 Merge pull request #3623 from akallabeth/mouse_wheel_event_check
Check hwheel capability before sending mouse event.
2016-11-25 13:41:07 +01:00
Armin Novak a0fed88574 Check hwheel capability before sending mouse event. 2016-11-24 13:19:46 +01:00
Viktor Mukha 649073ef7b Ungrab keyboard feature for X11 2016-11-24 11:35:30 +01:00
Armin Novak 3c25ffb38c Unified scanline padding function. 2016-11-24 09:02:06 +01:00
Norbert Federa 812def37f1 Merge pull request #3612 from akallabeth/align_fix
Fixed broken scanline alignment.
2016-11-23 17:57:47 +01:00
Martin Fleisz faefe54d69 Merge pull request #3603 from realjiangms/fix_shadow_resize
X11/client: call gdi resize on hw desktop resize.
2016-11-23 15:47:32 +01:00
Armin Novak 61a1c8ccc5 Fixed broken scanline alignment. 2016-11-23 12:54:20 +01:00
zihao.jiang e3506bfe88 X11/client: call gdi resize on hw desktop resize. The gdi primary buffer is used in client/X11/xf_gdi.c, it should be big enough to hold the full screen update 2016-11-17 14:36:02 +08:00
Armin Novak f62d00445e Fixed surface alignment. 2016-10-28 11:54:34 +02:00
David Fort 043243f43c Merge pull request #3560 from akallabeth/gfx_10_2
Gfx 10.2 caps and deactivate GDI unsupported functions
2016-10-21 09:29:51 +02:00
Martin Fleisz f5a6645832 Merge pull request #3571 from akallabeth/clang_fixes
Clang fixes
2016-10-19 15:45:17 +02:00
Armin Novak 4ceda8a097 Fixed uninitialized return. 2016-10-19 11:11:35 +02:00
Armin Novak b6907aa2b1 Deactivated unsupported operations. 2016-10-16 15:11:01 +02:00
Armin Novak 9c50e1a635 Replaced _VF formats with copy flags. 2016-10-14 10:36:52 +02:00
Armin Novak 25c7372fe6 Fixed offset and stride for X11 surface bits. 2016-10-12 09:32:05 +02:00
Armin Novak 8286fa4b96 Fixed format flip and offsets for GDI. 2016-10-11 18:50:01 +02:00
Armin Novak 404ae7d83c Fixed Windows 7 RFX issues. 2016-10-11 14:34:07 +02:00
zihao.jiang 34b4bca119 Fix nsc client after after color conversion huge fix
nsc codec client doesn't work:
1. We should mark invalid region for software gdi
2. Checked the code before color conversion fix, the correct color format should be PIXEL_FORMAT_BGRX32_VF (corresponds to old PIXEL_FORMAT_XRGB32_VF)
3. For gdi:hw: xfc->bitmap_buffer is never used/initialized. However gdi->primary_buffer is always maintained. So use primary_buffer to hold the decoded bitmap data
2016-10-11 02:18:31 +08:00
Martin Fleisz 38f9d0f675 Merge pull request #3529 from akallabeth/warning_fixes
Variadic macro warning fixes
2016-10-10 12:23:57 +02:00
Armin Novak 249bb1292f Fixed pointer color mapping. 2016-10-10 09:19:43 +02:00
Armin Novak 943e295714 WLog using C99 compatible variadic macros. 2016-10-07 14:05:27 +02:00
Armin Novak 649d270ccd Fixed GDI_RGN->null initialization. 2016-10-06 13:43:15 +02:00
Armin Novak 8f1adf64ee Refactored ClipboardSetData. 2016-10-06 13:43:15 +02:00
Armin Novak 97e8f9ec49 Fixed broken return check. 2016-10-06 13:43:15 +02:00
Armin Novak 70f3d43975 Removed broken return check. 2016-10-06 13:43:15 +02:00
Armin Novak 3b9c74ec0b Reformatted file. 2016-10-06 13:43:14 +02:00
Armin Novak dec268d1ab Reformatted file. 2016-10-06 13:43:13 +02:00
Armin Novak ab231f8180 Reformatted file. 2016-10-06 13:43:13 +02:00
Armin Novak 569c6a578d Reformatted file. 2016-10-06 13:43:13 +02:00
Armin Novak f2d7766db6 Moved common async input handling to core library. 2016-10-06 13:43:12 +02:00
Armin Novak 4e11883f27 Fixed X11 cursor decoding. 2016-10-06 13:43:11 +02:00
Armin Novak 83c6a7942d Removed broken X11 command. 2016-10-06 13:43:11 +02:00
Armin Novak 161685b25c Fixed some more glyph chache bugs. 2016-10-06 13:43:11 +02:00
Armin Novak 0c57065c73 GlyphCache: Erasing destination if not redundant. 2016-10-06 13:43:11 +02:00
Armin Novak c242467346 Fixed some X11 functions. 2016-10-06 13:43:10 +02:00
Armin Novak 22ddec810b Moved pre and post channel hooks. 2016-10-06 13:43:10 +02:00
Armin Novak 9c64e77a84 Disabled thread local storage on iOS.
iOS does not support Thread Local Storage.
Disabling it for now until a solution is found.
Print a compiler warning informing developers about this issue.
2016-10-06 13:43:10 +02:00
Armin Novak d35823cf69 Moved channel init code to core library. 2016-10-06 13:43:09 +02:00
Armin Novak dadc5262ae Removed static channel variables.
Global static variables do not work, if more than one instance
of an RDP client is running in the same process space.
Removed the varaibles where possible and replaced them with
thread local storage where necessary.
2016-10-06 13:43:09 +02:00
Armin Novak b765374d32 Refactored BitBlt, implementing everything now. 2016-10-06 13:43:08 +02:00
Armin Novak 3b21209e72 Fixed xfreerdp GDI color order. 2016-10-06 13:43:07 +02:00
Armin Novak c8a7065f93 Refactored xfContext. 2016-10-06 13:43:06 +02:00
Armin Novak 9af71b9878 Fixed color conversion from order. 2016-10-06 13:43:06 +02:00
Armin Novak 7dbeeb2df6 Fixed hardware GDI. 2016-10-06 13:43:04 +02:00
Armin Novak 9d82c4701b Removed duplicate code. 2016-10-06 13:43:03 +02:00
Armin Novak 867528015a Simplified bitmap drawing. 2016-10-06 13:43:03 +02:00
Armin Novak 032bdef955 Unified bitmap drawing. 2016-10-06 13:43:03 +02:00
Armin Novak b8ff3cb235 Fixed (a lot of) GDI drawing issues. 2016-10-06 13:43:03 +02:00
Armin Novak 3f90966da6 Bug fixes. 2016-10-06 13:43:03 +02:00
Armin Novak 85bbe2a908 API refactoring. 2016-10-06 13:43:03 +02:00
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