Commit Graph

2537 Commits

Author SHA1 Message Date
Armin Novak
b51a103b70 Fixed uninitialized values. 2017-07-20 09:35:41 +02:00
Armin Novak
8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Armin Novak
0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
dodo040
4e055453ab fix smartcard argument parsing 2017-07-19 13:16:08 +02:00
dodo040
722e927c64 redirect specific smartcard readers 2017-07-19 13:16:08 +02:00
Bernhard Miklautz
36f07fcfaf Merge pull request #4044 from akallabeth/disable_h264_if_not_compiled
Disable h264 if no backend compiled in
2017-07-19 12:02:53 +02:00
Armin Novak
3893058dc7 Added warning on GFX channel load that it does not support acceleration. 2017-07-19 09:54:42 +02:00
Armin Novak
61ab600c14 Always use software GFX for windows client. 2017-07-18 09:18:12 +02:00
Armin Novak
5764d5a78a Disable GFX H264 if no backend compiled in. 2017-07-17 09:25:21 +02:00
Norbert Federa
36b8f54c5e Fixed a few compiler warnings 2017-07-10 17:52:05 +02:00
akallabeth
59737d08ff Merge pull request #4033 from blino/wayland-fullscreen
Add fullscreen support in Wayland clients
2017-07-07 09:14:15 +02:00
akallabeth
2f231a8e17 Merge pull request #3992 from johnjmullen/fix-barcode-scanner
Fix issue #3229 Barcode Scanner USB - missing double characters
2017-07-07 08:53:21 +02:00
Olivier Blin
a57197a739 Support fullscreen setting in wayland client 2017-07-05 18:47:52 +02:00
weizhenwei
c39aecbdb4 fix memory leak of pKeys at xf_rail_invalidate_region() 2017-06-21 15:26:28 +08:00
David Fort
5ef9232703 Merge pull request #3905 from ilammy/x11-cliprdr/file-clipping
Local-to-remote file clipping for xfreerdp
2017-06-07 21:20:34 +02:00
John Mullen
de1868b6ab Fix issue #3229 Barcode Scanner USB - missing double characters
With some usb barcode scanners, repeated characters do not appear in the freerdp session.
It looks like this is because the KeyRelease signal is not sent for the first character.
Removing this if check fixes the problem.
2017-06-05 17:06:07 -04:00
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
bba910bd85 Fixed RPATH settings for OS X 2017-04-06 08:08:07 +02:00
Armin Novak
850d7fbc38 Update changed rectangles instead of extent. 2017-03-30 18:17:21 +02:00
Armin Novak
09d43a66f4 Fixed tests and dead store warnings. 2017-03-28 16:49:56 +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
Armin Novak
6b3048b85b Cleaned up database access code. 2017-03-13 12:05:49 +01:00
Armin Novak
f5e6aebb31 Using plain HTTP links for freerdp.com 2017-03-13 09:21:07 +01:00
Armin Novak
5546da2932 Readded css for phone layout. 2017-03-09 15:08:01 +01:00
Armin Novak
5f3dbc3784 Fixed help pages. 2017-03-09 13:55:19 +01:00
Armin Novak
2e9cb0f3ea Fixed keyboard show/hide 2017-03-09 13:55:05 +01:00
Armin Novak
91be74e0d6 Removed unused strings, translated missing ones. 2017-03-09 11:07:59 +01:00
Armin Novak
6f57b090a6 Validating advanced and screen settings. 2017-03-09 11:07:59 +01:00
Armin Novak
d8858cf19f Validating advanced settings before use. 2017-03-09 11:07:59 +01:00
Armin Novak
a595602953 Updated gradle and config printout. 2017-03-09 11:07:59 +01:00
Armin Novak
ed5b81a807 CSS to external file, fixed license linebreaks. 2017-03-09 10:01:36 +01:00
Norbert Federa
540bfe97df Merge pull request #3845 from akallabeth/afreerdp_db_upgrade
Afreerdp db upgrade
2017-03-08 09:35:52 +01:00
Armin Novak
589114593c Async transport removed, H264 check for support. 2017-03-07 16:09:24 +01:00
Armin Novak
f866d60c2c Validating log level. 2017-03-07 15:08:24 +01:00
Armin Novak
ade4bfcd3c Fixed issues with database upgrade code. 2017-03-07 14:50:52 +01:00
Armin Novak
1f1dae79e6 Fixed cursor empty checks. 2017-03-07 13:17:37 +01:00
Mariusz Białończyk
3e8446f11b Manual: remove a space in examples 2017-03-06 14:28:30 +01:00
Norbert Federa
f77b4a57dc Merge pull request #3796 from akallabeth/scan_warning_fixes_v2
Scan warning fixes v2
2017-03-03 14:41:11 +01:00
Armin Novak
03f3f061b7 Fixed disconnect handling. 2017-03-03 12:06:37 +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
Armin Novak
e1cfec1f6d Added missing translations for color enumeration. 2017-03-02 13:06:10 +01:00
Armin Novak
93cd763815 Removed https links in MPL and apache license. 2017-03-02 12:48:13 +01:00
Martin Fleisz
1207fdbff7 Merge pull request #3807 from akallabeth/afreerdp_update
Afreerdp update
2017-03-02 12:26:00 +01:00
Armin Novak
c204fbe409 Added client name reset if empty. 2017-03-02 10:27:13 +01:00
Armin Novak
345cbddba7 Updated intent filter to open RDP files. 2017-03-02 08:49:50 +01:00
Martin Fleisz
a391a3decc client: Check if channel has already been added 2017-02-24 13:03:03 +01:00
Armin Novak
05f6dac204 Moved construction to onCreate. 2017-02-24 11:30:36 +01:00
Armin Novak
eeee92a309 All EditTextPreferences are now single lined. 2017-02-24 09:48:40 +01:00
Armin Novak
37e9db4b04 Added signing configuration. 2017-02-24 09:29:26 +01:00
Armin Novak
65f761a587 Use HTTPS links in about. 2017-02-23 15:20:19 +01:00
Armin Novak
b938bb483a Updated gradle build, allow to configure from file. 2017-02-23 15:06:11 +01:00
Armin Novak
ae09ab79ae Updated about pages. 2017-02-23 13:24:00 +01:00
Armin Novak
f47bde3df2 Added a H264 availability check. 2017-02-23 12:31:08 +01:00
Armin Novak
5d8a9f2ff3 Fixed asset loading. 2017-02-23 10:51:21 +01:00
Armin Novak
71294554bd Updated licensing information and data protection clause. 2017-02-22 20:11:20 +01:00
Armin Novak
70e43e682e Refactored application settings, added client hostname (#1343) 2017-02-22 18:04:43 +01:00
Armin Novak
91c6d0db20 Refactored db upgrade code. 2017-02-22 16:08:43 +01:00
Armin Novak
a8bf7afac3 Using AppCompatActivity. 2017-02-22 16:08:43 +01:00
Armin Novak
57eea83c2a Deactivated async_transport #3134 2017-02-22 16:08:43 +01:00
Armin Novak
2a934b7d15 Reformatted using AndroidStudio coding style. 2017-02-22 16:08:43 +01:00
Armin Novak
553d7827ec Updated gradle. 2017-02-22 16:08: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
Volth
c333aa359f Add command line option to override action script path 2017-02-17 13:09:32 +00:00
Martin Fleisz
c325ec5325 Merge pull request #3780 from akallabeth/win_compile_fix
Win compile fix
2017-02-17 13:22:51 +01:00
Armin Novak
4f3633b409 Fix for #3627 2017-02-17 11:54:36 +01:00
Armin Novak
f8d22c00d6 Fixed compiler warnings and uninitialized data. 2017-02-17 11:17:45 +01:00
akallabeth
ba99e35f72 Merge pull request #3733 from chipitsine/master
Resolve issues detected by cppcheck
2017-02-17 10:46:35 +01:00
akallabeth
4065581c98 Merge pull request #3756 from bigpjo/master
.RDP Password Attribute
2017-02-17 09:52:22 +01:00
Ilya Shipitsin
9b12feb237 an argument check in xf_UpdateWindowArea 2017-02-17 13:38:05 +05:00
bigpjo
51b47890ef Change request from akallabeth
Change to allow username command line parameter to overwrite the .RDP
username
2017-02-16 19:16:56 +00:00
David Fort
c0f4b6bcad Merge pull request #3772 from akallabeth/sse_test_fixes
Sse test fixes
2017-02-16 16:37:27 +01:00
David Fort
2604b151ae Fix plugin loading for the sample client
Some missing initialisation bits were preventing the sample client from loading
the dynamic channel.
2017-02-16 14:57:36 +01: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
291362e2df Fixed possible memory leak. 2017-02-15 15:42:14 +01:00
Armin Novak
03abaf1aee Align scanline to multiple of 16, required for ASM 2017-02-15 12:08:32 +01:00
Armin Novak
2f8e206c58 Fixed freerdp_client_parse_rdp_file_buffer
The parser function needs a modifyable copy of the input buffer.
2017-02-14 16:02:11 +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
bigpjo
f0a52d431d .RDP Password Attribute
Allow password to be stored in .RDP file and parsed and settings
updated, this will allow for dynamic .RDP files to be created with
complete login credentials, using this method the username, server and
password will no longer be visible within process lists.

Also fixed issue of username and domain being read from .RDP files and
set to null by command line processor.
2017-02-10 20:38:52 +00:00
Volth
e7487cea27 Add command line option to override action script path 2017-02-08 08:30:24 +00:00
Norbert Federa
246801ec11 Merge pull request #3740 from akallabeth/gdi_color_conversion
Fix for GDI color decoding issues.
2017-02-06 15:13:56 +01:00
akallabeth
f93e277b5f Merge pull request #3735 from mfleisz/cmake_install_pdb_fix
Build: Use correct pdb names when installing with symbols
2017-02-01 11:06:52 +01:00
Armin Novak
df764f5aad Fixed GDI color decoding issues. 2017-02-01 11:02:23 +01:00
Mike Baum
6de47e7936 Flush stdout when asking about certificate 2017-01-31 15:33:44 -05:00
Martin Fleisz
c2eacd3b31 Build: Use correct pdb names when installing with symbols 2017-01-31 13:32:51 +01:00