Commit Graph

344 Commits

Author SHA1 Message Date
Armin Novak 594d10620e Fixed #5040: Unified xfreerdp window title setting. 2018-12-07 15:22:28 +01:00
Armin Novak 56156d217e Floatbar self contained. 2018-12-07 15:22:28 +01:00
Armin Novak e04c319d21 Added new default certificate callbacks with extended information.
The extended information provided by VerifyCertificateEx and
VerifyChangedCertificateEx is now exploited by the new functions
client_cli_verify_certificate_ex and client_cli_verify_changed_certificate_ex.

The old callbacks now print out deprecation warnings to inform the
user and developer about this deprecation.
2018-12-04 09:35:24 +01:00
Armin Novak 7d89ea22d4 Unified initialization of OrderSupport
Added a library internal function freerdp_settings_set_default_order_support
which initializes the OrderSupport array of settings.
Now clients no longer need to set this up on their own, if they
do not implement their own hardware accelerated order processing.
2018-11-23 10:11:50 +01:00
Armin Novak 666ef4ab34 Fix #4864: Register pointer cache after PostConnect is called
With #4950 client side pointer implementation was made optional.
This addresses an issue that each client had to call
pointer_cache_register_callbacks on its own.
2018-11-20 09:49:39 +01:00
Markus Mattes a235b44f61 added missing check for remote app where no floatbar exists 2018-10-18 15:33:01 +02:00
akallabeth 305f5d1bd5
Merge pull request #4600 from andreesteve/xfullscreen
X11: Fix fullscreen toggle
2018-10-17 17:27:29 +02:00
Martin Fleisz e46d1d95ff
Merge pull request #4926 from akallabeth/primary_order_checks
Order data validation and correction
2018-10-17 16:02:28 +02:00
akallabeth 5778bf102b
Merge pull request #4891 from akallabeth/rail_fixes
Rail fixes #4846 and a crash
2018-10-17 11:32:56 +02:00
Armin Novak 10cc319973 Announce glyph orders if glyph cache is activated. 2018-10-17 10:47:23 +02:00
Armin Novak ca3fb26230 Deactivated unimplemented orders. 2018-10-15 15:22:50 +02:00
Armin Novak f88ed950d3 Fixed various issues with primary orders. 2018-10-15 14:30:58 +02:00
David Fort 2e1bf90bd9
Merge pull request #4885 from akallabeth/autoreconnect_handle_window_events
Fixed #3423: Process xevents when in reconnect mode.
2018-10-03 09:42:16 +02:00
Armin Novak 316eed1fbf Menus are no longer popup windows but dropdown menus. 2018-09-26 12:38:16 +02:00
akallabeth 0b8a66188c
Merge pull request #4865 from mmattes/feature/floatbar
Feature/floatbar for X11
2018-09-25 16:34:20 +02:00
Armin Novak 51f97f2d3e Fixed #3423: Process xevents when in reconnect mode.
Fixed crashes due to unloaded disp channel in reconnect mode.
2018-09-24 16:24:32 +02:00
Armin Novak 897c0c72a7 Unified auto_reconnect functions for all clients. 2018-09-24 10:31:43 +02:00
akallabeth 30601608e4
Merge pull request #4855 from r-barnett/fix-logoff-exit-code
Map a particular disconnect situation triggered by a user logging off…
2018-09-20 12:07:36 +02:00
rbarnett 5d3e76bd80 Replace cryptic names; move the disconnect ultimatum reasons enum into public API and rename; remove setter 2018-09-19 09:36:39 -05:00
rbarnett 8458266183 Store the disconnect provider ulimatum reason in a new field in struct rdp_context and move the test for a logoff reason to xf_client.c 2018-09-18 15:31:10 -05:00
Markus Mattes 21e4804a7f implemented floatbar for x11 2018-09-18 21:25:51 +02:00
Martin Fleisz 0b7b9c0dc4
Merge pull request #4842 from akallabeth/smartcard_rdp_logon
Added /smartcard-logon option to set flag. (Stripped version of #4837…
2018-09-17 09:08:47 +02:00
rbarnett 1e7be9908b Add an exit code for a security protocol negotiation failure 2018-09-13 10:29:23 -05:00
rbarnett 4e97edadec Set an error exit code for an unsuccessful reconnect 2018-09-12 10:16:27 -05:00
Armin Novak 0de43c8b85 Added /smartcard-logon option to set flag. (Stripped version of #4837 by @informatimago) 2018-09-04 15:50:03 +02:00
Armin Novak 54f3a388da Fixed #4835: BeginPaint callback now optional. 2018-09-04 10:40:17 +02:00
Armin Novak 62c1696d4c Removed use of unchecked sprintf 2018-08-27 14:34:42 +02:00
Armin Novak c3a26b0d6a Removed +async-transport options
The async transport option is broken by design.
If used the main loop is called from the transport thread and the
main thread of the application.
Unless the transport layer is refactored to just work on queues
(input and output) this option will never work, therefore remove it.
2018-08-22 13:56:37 +02:00
Martin Fleisz 143a2b149a
Merge pull request #4755 from akallabeth/dyn_resize_fix
Fixed #4679, #4753 dynamic resizing
2018-07-30 12:28:38 +02:00
Markus Mattes e6209748fa Removed double ifdef WITH_XI, XInput2.h already included 2018-07-24 14:03:45 +02:00
Armin Novak 328eba7fe9 Fix #4752: Provide message free function for channel queue. 2018-07-18 15:31:07 +02:00
Armin Novak ced4d06f74 Fixed #4679, #4753 dynamic resizing
Simplified resize logic, do not check before setting current resolution.
2018-07-18 09:48:19 +02:00
Andre Esteve ab0bc2a7f5 X11: Fix fullscreen toggle
1. Fix fullscreen toggle for window managers that do not have multimonitor fullscreen extension support
2. Fix current monitor detection
3. Fix calculation of vscreen boundaries when single monitor is being used
4. Fix start up position of window when starting (used to always go to the top left corener, now centered)

Still a problem:

1. Window decorations do not show when going windowed
2. Smart resizing makes i3 really sad :(
3. Moving window across monitors and going fullscreen always maximizes on startup screen (when not using /multimon)
2018-05-05 18:24:23 -07: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
Armin Novak 9fc8dc6b5d Removed gdi->codecs, unused. 2016-10-06 13:43:00 +02:00
Armin Novak 03907c82a9 Fixed issues. 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 da956e0388 ... 2016-10-06 13:42:59 +02:00
Armin Novak df35c135d1 Fixed color conversion, unified GFX and updated API. 2016-10-06 13:42:58 +02:00
Norbert Federa 374f97aad3 client/x11: don't close locked mutex 2016-06-07 19:01:03 +02:00
Armin Novak 36cbf1b583 Fixed error handling for channel load failures. 2016-03-14 13:13:43 +01: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
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
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
Norbert Federa 3eee70b164 Merge pull request #2926 from bjcollins/rail_fixes
Rail fixes
2015-11-06 13:34:42 +01:00
Norbert Federa a4580923e7 xfreerdp/clipr: fix self owned test and hardening
- xf_cliprdr_is_self_owned() lied if multiple xfreerdp instances were
  running.
- fixed a few unchecked callocs
- added/modified and handled some return values in compliance with
  the new hardened channel api
2015-10-20 21:28:29 +02:00
bjcollins 8e27b6d05e RemoteApp Support
1. Remove all uses of "localWindowOffsetCorr" variables, they added an extra layer of complexity and they are not actually needed to handle coordination of window position/size between
the local coordinate system and the remote one. This logic was causing issues in the case where the window was moved off the left side of the screen.

2. Update the xf_setWindowVisibilityRects function to offset the visibility rects as necessary when the window is hanging off the left side of the screen.

3. Stop sending mouse events when doing keyboard moves/sizes(as desired), and stop sending two mouse events for non-keyboard moves/sizes

4. Move location of new UTF8_STRING variable from previous commit

5. Refresh window and window shape for any window position/size updates, this helps keep the local and server windows in sync and works around some race conditions
2015-10-15 18:41:55 -05:00
bjcollins cb4e4cf6fc Store Miscellaneous X11 Atoms into variables to match how we handle other X11 Atoms. 2015-10-15 14:59:53 -05:00
bjcollins 6d3565bd4c Fix xf_rail_paint fencepost error
The regions used to store and calculate the invalidRegion are exclusive
of the bottom and right edges, not inclusive.

Fixes "mouse droppings" in mspaint.exe when moving the mouse leftwards
across the canvas.
2015-10-15 14:29:48 -05:00
bjcollins 7fbc7e45a7 Clean up NLA authentication failure handling code
1. Make use of freerdp_set_last_error to set authentication failure without the helper functions
2. Rename ssl callback function
3. Break out AuthenticationOnly exit handling from bad connect handling
2015-09-15 14:07:14 -05:00
bjcollins 32a1406dc4 Return FREERDP_ERROR_AUTHENTICATION_FAILED on an authentication failure
when using NLA with xfreerdp.
2015-09-15 14:07:14 -05:00
Martin Haimberger 52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Martin Haimberger 2862109337 Merge remote-tracking branch 'upstream/master' into mh-channel-fix
Conflicts:
	channels/smartcard/client/smartcard_main.c
	channels/smartcard/client/smartcard_operations.c
2015-07-30 07:29:12 -07:00
MartinHaimberger 45f9519b58 Merge pull request #2723 from akallabeth/pwd_from_stdin
New /from-stdin
2015-07-15 14:12:13 +02:00
Martin Haimberger 6ab0187d84 Merge remote-tracking branch 'upstream/master' into mh-channel
Conflicts:
	channels/audin/client/oss/audin_oss.c
	channels/drive/client/drive_main.c
	channels/printer/client/printer_cups.c
	channels/printer/client/printer_main.c
	channels/rail/client/rail_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	channels/rdpsnd/client/oss/rdpsnd_oss.c
	channels/remdesk/client/remdesk_main.c
	channels/remdesk/server/remdesk_main.c
	channels/tsmf/client/tsmf_media.c
2015-07-15 01:57:07 -07:00
Bernhard Miklautz f589d5d6e0 x11: reorder xf_post_disconnect
Channels like EGFX need resources like the main window in order to
work correctly. Before the window, GDI,.. is freed it needs to be
ensured that all channels are stopped properly to prevent them to access
already freed resources. Disconnecting the channels first fixed a
possible race condition/SEGFAULT that could occur with remote initiated
disconnects.
2015-07-14 15:28:55 +02:00
Bernhard Miklautz 68e8569110 winpr/synch: remove the dependency on winsock.h
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
2015-07-14 11:39:41 +02:00
Armin Novak 4e7c03fabf Added error checks and resource cleanup. 2015-07-03 11:26:22 +02:00
Armin Novak d18b0fbeb4 Handle API updated. 2015-07-03 09:52:52 +02:00
Armin Novak 5a5ed77c57 Added /from-stdin 2015-06-23 14:59:54 +02:00
David FORT 7c3f8f33ab Fixes for malloc / calloc + other fixes
This patch contains:

* checks for malloc return value + treat callers;
* modified malloc() + ZeroMemory() to calloc();
* misc fixes of micro errors seen during the code audit:
** some invalid checks in gcc.c, also there were some possible
integer overflow. This is interesting because at the end the data are parsed
and freed directly, so it's a vulnerability in some kind of dead code (at least
useless);
** fixed usage of GetComputerNameExA with just one call, when 2 were used
in misc places. According to MSDN GetComputerNameA() is supposed to return
an error when called with NULL;
** there were a bug in the command line parsing of shadow;
** in freerdp_dynamic_channel_collection_add() the size of array was multiplied
by 4 instead of 2 on resize
2015-06-22 19:21:47 +02:00
Bernhard Miklautz d9d1759abc Fix compiler warnings:
gcc 4.7.2

client/X11/xf_keyboard.c: In function ‘xf_keyboard_action_script_init’:
client/X11/xf_keyboard.c:48:6: warning: unused variable ‘exitCode’
[-Wunused-variable]

gcc 4.9

client/X11/xf_client.c: In function ‘xf_client_thread’:
client/X11/xf_client.c:1537:3: warning: ‘inputThread’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
2015-06-22 19:09:59 +02:00
Bernhard Miklautz bf73f4e4f1 Fix unchecked strdups
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Martin Haimberger 6e4e1c2773 Merge remote-tracking branch 'upstream/master' into mh-stream-fix
Conflicts:
	client/Windows/wf_cliprdr.c
2015-06-18 03:06:40 -07:00
Martin Haimberger b9853f87eb channel encomsp hardend 2015-06-18 03:04:32 -07:00
Norbert Federa f04bb6c53d xfreerdp: xfc->palette wasn't updated with /gdi:sw
When using software gdi (/gdi:sw) the rdp update PDU callback
gdi_palette_update() is used which writes the new colors to
the rdpContext's gdi->palette buffer.
The X11 functions however access xfc->palette which gets only
updated by xf_gdi_palette_update() which is the callback if
/gdi:hw is used.

This commit changes xfc->palette to a pointer which points to
xfc's private buffer with /gdi:hw or to the gdi->palette if
software gdi is used.
2015-06-11 18:40:41 +02:00
David FORT 12f873f1f9 Fixed MessageQueue and callers 2015-05-29 14:24:14 +02:00
Norbert Federa 1b5abec683 client/x11: fixed if statements with empty body 2015-05-17 18:24:11 +02:00
Norbert Federa 71a4349928 fixed multiple missing gdi return value checks
mainly gdi_Create* functions
2015-05-08 21:39:23 +02:00
David FORT 0e2925d0b8 Fix remoteApps
The assert that have been removed were preventing RAIL from working when you
have an intermediary screen before seeing the application.
2015-05-07 14:36:07 +02:00
Norbert Federa 25fc866a58 Fix unchecked CreateThread calls and misc fixes 2015-05-05 13:55:48 +02:00
Norbert Federa ef1fd12b15 Fix unchecked CreateEvent calls and misc fixes
1)
Added missing checks for CreateEvent which also required the
following related changes:

- changed freerdp_context_new API to BOOL
- changed freerdp_peer_context_new API to BOOL
- changed pRdpClientNew callback to BOOL
- changed pContextNew callback to BOOL
- changed psPeerAccepted callback to BOOL
- changed psPeerContextNew callback to BOOL

2)
Fixed lots of missing alloc and error checks in the
changed code's neighbourhood.

3)
Check freerdp_client_codecs_prepare result to avoid segfaults
caused by using non-initialized codecs.

4)
Fixed deadlocks in x11 caused by missing xf_unlock_x11() calls
in some error handlers

5)
Some fixes in thread pool:
- DEFAULT_POOL assignment did not match TP_POOL definition
- don't free the pool pointer if it points to the static DEFAULT_POOL
- added error handling and cleanup in InitializeThreadpool
2015-04-29 18:18:39 +02:00
Hardening 6cd7713e12 Merge pull request #2544 from bmiklautz/boolenization
change return types of callbacks to BOOL
2015-04-22 11:01:27 +02:00
Bernhard Miklautz 515502ffa5 change return types of callbacks to BOOL
* change all client/server callbacks to BOOL
* update all clients accordingly
* add multiple return value checks
* small fixes
2015-04-21 14:18:07 +02:00
Armin Novak d3336340ba Add *get_event_handles handle count, return check. 2015-04-21 12:24:50 +02:00
Norbert Federa fd5f47428b xfreerdp: fixed initial smart-sizing dimensions
The window width/height variables and in turn SmartSizingWidth/Height
get automatically updated in th the configure notify event handler.
If the window is created initially the values don't differ from the
event values and therefore SmartSizing was not applied until the
window was resized.
2015-04-16 23:54:56 +02:00
Norbert Federa bad2f138c1 xfreerdp: FS fixes & smart-sizing resuscitation
- make smart-sizing work again which was killed in previous commits
- removed several unnecessary/ugly workarounds
- miscellaneous small fixes
- new feature: restore previous window position when toggling out of
  fullscreen mode
- new feature: if /f is specified in combination with /smart-sizing:WxH
  we run the session in the /smart-sizing dimensions scaled to full screen
2015-04-16 17:31:22 +02:00
Norbert Federa eb14ab15f5 xfreerdp: removed some weird/unnecessary code 2015-04-16 17:31:22 +02:00
Norbert Federa 98505a0234 xfreerdp: removed desktopWidth/desktopHeight vars
These were basically unused (from the contexts's point of view)
and only served as temporary storage
2015-04-16 17:31:22 +02:00
Norbert Federa 6354a7561c xfreerdp: rename xf_context's width height vars
Since several contributers in the past repeatedly made the error
to treat xfc->width and xfc->height as equal with the x11 window
width and heigth I've renamed these variables to sessionWidth and
sessionHeight.
2015-04-16 17:31:22 +02:00
bjcollins d4a9a2d3a8 Remove override redirect flag for fullscreen with keyboard grab enabled. Window manager should always know about the main window.
Small cleanup of passing around decorations flag.
Limit PercentScreen to single monitor vs. entire desktop. IMO - this is better behavior in a multimonitor environment.

Handle fullscreen windows better:
1. Ensure that size hints are set to allow resizing before setting a window to fullscreen as some window managers do not behave properly.
2. Handle fullscreen toggles without destroying and recreating window.
3. Use NET_WM_STATE_FULLSCREEN Extended Window Manager Hint for fullscreen functionality
4. Use the NET_WM_FULLSCREEN_MONITORS Extended Window Manager Hint when appropriate
5. When a single monitor fullscreen is requested - use the current monitor(as determined from mouse location)
6. Handle cases where there is no local monitor at coordinate 0,0. The Windows server expect there to be a monitor at this location, so we maintain offset if necessary between our local primary monitor and the server side primary monitor located at 0,0.
2015-02-23 11:22:28 -06:00
Marc-André Moreau 9b9fbd2ab1 xfreerdp: fix fullscreen mode 2015-02-10 15:15:30 -05:00
Marc-André Moreau b025d83919 Merge pull request #2374 from bjcollins/master
Apply correct exit code to xfreerdp application for certain log offs
2015-02-10 10:41:10 -05:00
bjcollins bb87599f80 Apply correct exit code to xfreerdp application for log off from certain flavors of Windows. 2015-02-09 17:15:07 -06:00
Armin Novak b4db02867a Fixed resource cleanup on disconnect. 2015-02-09 17:33:55 +01:00
Marc-André Moreau 82d58086db xfreerdp: partial reconnect fixes 2015-02-05 17:01:56 -05:00
Marc-André Moreau 7c6948cd5c xfreerdp: make use of freerdp_get_event_handles 2015-01-30 09:47:02 -05:00
Marc-André Moreau 9bc32c2a85 Revert "Moved channel loading, now only loading before connect."
This reverts commit f7756efca6.
2015-01-20 10:15:37 -05:00
Armin Novak f7756efca6 Moved channel loading, now only loading before connect. 2015-01-20 12:13:08 +01:00
Armin Novak 5bc1e41109 Using freerdp_channels_disconnect now. 2015-01-20 11:24:58 +01:00
Armin Novak 7dda510dda Resetting disconnect flag on client start.
Fixed initialisation of variable to avoid NULL dereference.
2015-01-13 12:43:27 +01:00
Armin Novak 524e4635fd Fixed typos.
gdi_free now done on disconnect.
2015-01-13 12:00:51 +01:00
Marc-André Moreau f1bd547580 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	client/X11/xf_client.c
2014-12-15 15:55:51 -05:00
Norbert Federa 5c68b1cf22 xfreerdp: fix RDP order color conversion
Note: /gdi:sw was working fine, this commit fixes /gdi:hw

* calculate color channel shifts based on X11 visual color masks
* fast path to skip conversion if visual color masks equal rdp color masks
* successfully tested 8/15/16/24/32 bpp rdp sessions on 16/24/32 bpp visuals
2014-12-15 16:34:09 +01:00
Marc-André Moreau e2f377ae11 libfreerdp-core: fix TSG thread shutdown and input freeze problem 2014-12-15 09:42:04 -05:00
Bernhard Miklautz 67b6cc7518 xfreerdp: clean up AuthenticationOnly
* removed dead code path: user name is always set now
* update message if no password was set
2014-12-08 18:13:54 +01:00
Bernhard Miklautz 2dca3f3356 xfreerdp: use login name if no user name was set
If no user name is set with /u:.. use the login name of the current user will be
used as user name.
2014-12-08 18:07:05 +01:00
Marc-André Moreau 53686e414a Merge pull request #2259 from erbth/master
fixed shutdown of input thread in xfreerdp
2014-12-08 10:01:27 -05:00