Commit Graph

212 Commits

Author SHA1 Message Date
Markus Mattes 21e4804a7f implemented floatbar for x11 2018-09-18 21:25:51 +02:00
Armin Novak 9bd13c25c9 Added WaitableTimer implementation for mac OS. 2018-03-12 13:39:21 +01:00
Armin Novak 44eebbb6e0 Fixed compiler warnings. 2018-03-07 14:47:06 +01:00
Armin Novak 2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak 990b8c23a9 Fixed PubSub function pointer casts. 2018-02-14 11:00:52 +01:00
David Fort 484abe0567 video: fix invalid geometry and invalid argument passing to time pubsub 2018-02-14 00:08:52 +01:00
Martin Fleisz bc4b57c08d
Merge pull request #4426 from akallabeth/pointer_null_fix
Check if xfreerdp window != NULL
2018-02-13 14:37:13 +01:00
Armin Novak 7274ffe6a8 Check if xfreerdp window != NULL
When xfreerdp aborts a connection it may be before xfc->window was allocated.
Don't access it in that case.
2018-02-13 13:38:02 +01:00
David Fort b8e3b232de video: mutualize things in the common channel code 2018-02-13 10:52:53 +01:00
David Fort ca4f75ccd3 video: fixed uninit of channel 2018-02-13 10:51:45 +01:00
David Fort a07efb73ec video: an implementation of MS-RDPEVOR for X11
Implements the decoding of video streams using common H264 decoders. We also implement
a trivial feedback algorithm.

Sponsored by: Rangee GmbH (http://www.rangee.de)
2018-02-13 10:51:07 +01:00
Armin Novak 62607e3b02 Fixed accidental free of XImage data. 2018-02-12 12:44:51 +01:00
Armin Novak 1b9da01612 Fixed cleanup of xfc->drawable. 2018-02-09 11:42:18 +01:00
Armin Novak ed9d86b1a3 Fixed GFX output expose. 2018-02-08 13:55:36 +01:00
Armin Novak c0ec81c3c7 Do not update client if output suppressed. 2018-02-08 11:59:00 +01:00
Armin Novak 5144e6e600 Exit client thread if freerdp_connect fails
freerdp_disconnect must only be called, if the connection
was established. Otherwise all resources are cleaned up twice
leading to double free and other issues.
2017-12-22 11:09:23 +01:00
Armin Novak 1628045f67 Fullscreen without _NET_WM_FULLSCREEN_MONITORS
Some window managers do not support _NET_WM_FULLSCREEN_MONITORS.
In that case multimonitor fullscreen does not properly work, so
add a path resizing the window over all screens instead.
Based on @erbth pull request, adding proper X11 atom checks.
2017-12-20 16:54:44 +01:00
David Fort ce89a9096e disp: improve window resizing
To workaround a bug with 2012r2 servers, don't send any resize during renegociation
and don't resize at a too high rate (every 200ms is good enough).
2017-12-19 20:59:10 +01:00
David Fort 80dab90f1a disp: implement dynamic resolution for X11
If the display channel is available we use it to allow the user to resize the
xfreerdp window. When the window is resized we announce a new monitor layout and
the server reacts by doing a reactivation sequence to the new size.
The minimum window size is limited to 300x300 as 2012 servers crash horribly
if we send them a smaller layout.
2017-12-14 15:13:11 +01:00
Armin Novak ce00f4dd8f Silence WLog_ERR messages if last error is set. 2017-11-06 14:02:22 +01:00
Ondrej Holy 3137caebf2 Fix colors on big endian (#4135)
* client/x11: Fix colors on big endian

The bitmaps are recieved in little endian byte order (LSBFirst in terms
of X11). This is a problem on systems, where bitmaps are expected in big
endian byte order (MSBFirst). X11 client tries to handle this situation
by different color formats (e.g. RGBX vs. BGRX), but this doesn't work.
BGRX is not MSBFirst variant of RGBX, it should be XRGB. But this would
work only for 32/24 depths, where color channels matches bytes. Let's
say to the XServer that all the bitmaps are in LSBFirst encoding instead
of changing the color formats on big endian systems.

https://github.com/FreeRDP/FreeRDP/issues/2520

* client/x11: Fix cursor color on big endian

The cursor color is wrong on big endian systems. It is not probably
possible to force bitmap_order for XcursorImage as it is possible for
XImage. Fortunately, cursors are always 32 bit so we can use ABGR
instead of BGRA to deal with.

https://github.com/FreeRDP/FreeRDP/issues/2520

* client/x11: Fix comment indentation

The comment has wrong indentation for some reason, let's fix it.

* client/x11: Fix BGR vs. RGB detection

The BGR vs. RGB detection code is leftover from history and I am conviced
that it is wrong with the current color handling, where invert flag is TRUE
by default. However, I suppose that the detection still makes sense and
XServer may use the inverted formats in some cases. Maybe we can force XServer
to use our masks somehow, but let's just fix the value to FALSE now.

* client/x11: Remove unused color shifts

The color shifts are lefover from history and are not used in current
code. Let's remove them.
2017-09-18 10:47:56 +02:00
Armin Novak b1d631f1e5 Added support for Set Keyboard IME Status 2017-05-12 09:43:58 +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
Armin Novak 8c687611af Print logon error info. 2017-03-17 13:48:32 +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 198bc6d9e1 Fixed compiler warnings. 2017-02-16 13:17:49 +01:00
Armin Novak 042594bf82 Fixed stride for XCreateImage. 2017-01-25 08:34:16 +01:00
Armin Novak 03adbd24a8 AutoReconnect support unlimited retries. 2017-01-09 12:34:09 +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
Armin Novak f0203900d7 Fixed +auto-reconnect (#3650) 2016-12-15 12:10:11 +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 b6907aa2b1 Deactivated unsupported operations. 2016-10-16 15:11:01 +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 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 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 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 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 b8ff3cb235 Fixed (a lot of) GDI drawing issues. 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 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