Commit Graph

2502 Commits

Author SHA1 Message Date
David Fort
5258a980f5 Merge pull request #4104 from abma/master
Revert "Possible fix for #4081 and #2707 (#4087)" (Part of #4096)
2017-08-29 11:06:13 +02:00
Bernhard Miklautz
52fbfb7b12 fix clang warnings, directly include wtypes.h (#4097)
* build: clang use -Wno-unused-command-line-argument

With clang 5.0 builds are quite noisy otherwise.

* Directly include wtypes.h

Directly include winpr/wtypes.h where _fseeki64 or _ftelli64 is used.

* fix build warnings with clang 5

clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: parentheses-equality

* fix build warnings with clang 5

clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: tautological-compare

* fix build warnings with clang 5

clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning:
incompatible pointer types passing 'size_t *' (aka 'unsigned
long *') to parameter of type 'UINT32 *' (aka 'unsigned int *')
[-Wincompatible-pointer-types]
2017-08-29 09:09:38 +02:00
David Fort
9a81531cb6 Merge pull request #4100 from mmeyer724/wayland-opaque
wlfreerdp: improve performance by making the window opaque
2017-08-26 10:17:02 +02:00
abma
165de91287 Revert "Possible fix for #4081 and #2707 (#4087)"
This reverts most of commit 6b7b602370.

Part of #4096
2017-08-22 22:45:38 +02:00
Michael Meyer
65daae0190 wlfreerdp: improve performance by making the window opaque 2017-08-17 17:32:26 -04:00
Michael Meyer
e695645a79 wlfreerdp: mirror display resolution in fullscreen mode 2017-08-17 14:23:45 -04:00
Bernhard Miklautz
1e54fdb5c2 android: fix a regression with remote program (#4091)
Commit 54a7d799d1 introduced a problem
where /app was used instead of /shell causing a black screen when remote
programs were used. The Android client doesn't support remote apps
therefore /app can't work. "Remote program" just sets the selected
program as shell to run.
2017-08-16 13:28:11 +02:00
Armin Novak
eb0bf411af Do not add quotes to client hostname. 2017-08-16 11:31:33 +02:00
Bernhard Miklautz
ed36f55f3e Merge pull request #4088 from akallabeth/file_api_64bit_fixes
fseeko and ftello for 64bit file support.
2017-08-16 10:04:13 +02:00
Jiang, Zihao
790c48017c Client/X11: Fix h264 context leak when DeleteSurface (#4089) 2017-08-14 10:16:14 +02:00
Kai
6b7b602370 Possible fix for #4081 and #2707 (#4087)
* detect openbox automatically

* format code

* copyright update

* free prop at the end of the function
2017-08-14 10:10:53 +02:00
Armin Novak
c3d4b7d262 fseeko and ftello for 64bit file support. 2017-08-14 08:42:49 +02:00
Mike Gabriel
dc075fb133 Fix warning in man pages
"warning: can't find macro file `www.tmac))'""`"
2017-08-03 08:41:50 +02:00
Armin Novak
dd4b5ea126 Disable JPEG codec support if not compiled in. 2017-07-24 15:23:36 +02:00
Armin Novak
0dc45c733e Fixed missing include. 2017-07-20 09:35:42 +02:00
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