Commit Graph

1293 Commits

Author SHA1 Message Date
ilammy 391ed0d91d client/X11: transfer raw clipboard format lists
The first part of raw transfer sequence is to transfer the format
list of the session A into the session B. Then we will be able to
request/reply with raw data using proper format IDs.

xf_cliprdr_server_format_list() of the session A now exposes the
raw server format list. As soon as the list is received, it is
serialized and put into _FREERDP_CLIPRDR_FORMATS property.

xf_cliprdr_get_requested_targets() of the session B now checks
whether the clipboard owner is a FreeRDP session with enabled
raw transfer capability. If it is, the raw format list is simply
extracted from _FREERDP_CLIPRDR_FORMATS of the clipboard owner.
Otherwise, the format list is populated from the usual TARGETS
clipboard format.
2015-11-14 19:03:10 +02:00
ilammy 626e40a9c1 client/X11: add raw clipboard transfer indication
Some time ago there was a property _FREERDP_CLIPRDR_ID which was indended
to indicate that an XFreeRDP window owns a clipboard. This was necessary
for raw transfers. This property was used by xf_cliprdr_is_self_owned()
function. However, raw transfer support was broken and the meaning of
xf_cliprdr_is_self_owned() gradually changed into checking whether
the *current* window owns the clipboard, not just any XFreeRDP window.
Thus _FREERDP_CLIPRDR_ID was removed in a4580923e7 (xfreerdp/clipr:
fix self owned test and hardening).

However, now we are going to fix raw transfers and we need that property.
This patch reintroduces a similar property "_FREERDP_CLIPRDR_RAW" which
indicates that a window is an XFreeRDP window with enabled raw transfer.
It is currently used by xf_cliprdr_server_format_data_request() to
correctly request format data from another XFreeRDP instance via raw
transfer protocol.

This property can be queried from the clipboard owner with the function
xf_cliprdr_is_raw_transfer_available() and can be enabled or disabled
on the current window by xf_cliprdr_set_raw_transfer_enabled().

Disabling raw transfers will be necesary to correctly implement file
transfers in the future. However, currently raw transfers are always
enabled.
2015-11-14 19:03:10 +02:00
ilammy 532371d5aa client/X11: remove unused function
xf_cliprdr_send_data_request() is actually used instead of this one.
2015-11-14 19:03:10 +02:00
ilammy 46fb66e0fb client/X11: send clipboard format data errors correctly
xf_cliprdr_send_data_response() is consistently called with NULL
data pointer as a way to report errors, but it was not setting
the msgFlags field accordingly.
2015-11-14 19:03:10 +02:00
ilammy d7c9a31b4b client/X11: correctly trim terminating null bytes from strings
Sometimes Windows sends strings with excess null terminating bytes.
For example, when one copies digits from calc.exe. At the same time,
some local applications freak out when they encounter null bytes
(at least LibreOffice is known to be replacing them with '#').

According to the specification of UTF8_STRING format [1], the string
data must not contain any trailing null bytes. So they all should be
trimmed, not only the last one.

Also, if the trailing null byte is not present, the length should not
be adjusted. For example, Firefox is actually sending "HTML Format"
without a null byte while Internet Explorer adds one. The spec for
text/html format [2] says nothing about the teminating null byte, so
we are free to remove it, but at least we should not mistakingly
delete '>' character of "</html>" tag when it is the last character.

[1] http://www.pps.univ-paris-diderot.fr/~jch/software/UTF8_STRING/UTF8_STRING.text

[2] https://www.ietf.org/rfc/rfc2854.txt
2015-11-14 19:03:10 +02:00
ilammy b9a297379b client/X11: improve named clipboard format support
Clipboard formats are identified by numerical IDs and literal names.
We can keep using arbitrary defined IDs for local clipboard formats
as we are sure that they have some fixed meaning, but the server can
and will be using its own IDs, which can be different from ours for
the named formats.

Therefore:

1) A correct way to compare a local format to a remote one is
   to check the names first, and only then compare their IDs.
   (Extra care should be taken to support short format names.)

2) Server IDs cannot be used with wClipboard directly when dealing
   with named formats. Format name should be used to extract correct
   local ID for the use with Clipboard{Set,Get}Data().

Also, I find the notion of 'alternate' format IDs to be confusing.
We either deal with a fixed ID format (declared in <winpr/user.h>),
or a format that was given an arbitrary fixed ID for local use
(defined in <freerdp/channels/cliprdr.h>), or a remote format
identified by a pair of an ID and a name. Format IDs can be local
and remote, but there are no 'alternates'.

So now:

1) A new function xf_cliprdr_formats_equal() is used to compare
   formats correctly in xf_cliprdr_get_server_format_by_atom()
   when searching for a server format corresponding to a local
   one, and in xf_cliprdr_server_format_list() when constructing
   a local TARGETS list from the server format list.

2) Correct local format IDs are used with wClipboard conversions
   by xf_cliprdr_process_requested_data() and
   xf_cliprdr_server_format_data_response().

3) We refer to formatId and formatName when doing requests,
   and srcFormatId and dstFormatId when doing conversions,
   instead of using formatId and altFormatId for both purposes.

4) Server format ID and name are used to identify cached clipboard
   contents. The name is compared directly as a pointer because it
   will be a pointer from the same clipboard->serverFormats array.

   Also, the clipboard contents are invalidated when format list
   arrives, so xf_cliprdr_server_format_list() now also clears
   the format ID and name together with the data.
2015-11-14 19:03:10 +02:00
ilammy 8434709fc6 client/X11: improve clipboard format search functions
The functions now have appropriate names which tell what exactly
they are searching for:

    xf_cliprdr_get_client_format_by_id()
        Get a client-provided format by client-side ID.

    xf_cliprdr_get_client_format_by_atom()
        Get a client-provided format by client-side format name.

    xf_cliprdr_get_server_format_by_atom()
        Get a corresponding server format by client-side format name.

The return types of functions have been adjusted accordingly and
correct formats are now used everywhere without mixing them up:
client-side formats are used for client -> server data flow,
while server-side ones are used for server -> client tranfers.

This resolves the issue #1414 as, for some reason, xfreerdp required
server format list to be present to be able to provide its own client
formats. Actually, we need only client format list to provide these.

Also, CF_RAW special case is handled in a more elegant way: it is
assumed to be present in every server format list (which is true).
2015-11-14 19:03:10 +02:00
Hardening be8f8f7238 Merge pull request #2970 from bmiklautz/prep_2.0
2.0 preparations
2015-11-11 12:54:34 +01:00
Wouter van Kesteren 857c003e47 cmake: tweak manpage install location
This patch is needed when wanting to install binaries/libraries to other
locations than data. The linux distro Exherbo installs binaries and
libraries to /usr/<chost>/bin, /usr/<chost>/lib respectively but
manpages should still go in /usr/share/man/ because they are
architecture independent, without this patch they go in
/usr/<chost>/share/man unconditionally.

cmake documentation states:
DATAROOTDIR - read-only architecture-independent data root (share)

So this patch makes it use that so that its configurable.
2015-11-09 21:57:41 +01:00
Bernhard Miklautz 67368b2ec7 Adapt error level for debug messages
When using xfreerdp a regular invocation should really only report grave
problems as error. "Regular" messages should be either info or even
debug.
2015-11-09 18:27:38 +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 7ddd15d8de client/X11: fix post fullscreen repositioning 2015-11-04 17:58:21 +01:00
Norbert Federa 48be0815c1 client/X11: multimon/fullscreen fixes
- fixed wrong calculation of xfc->fullscreenMonitors.[right|bottom]
- only use _NET_WM_FULLSCREEN_MONITORS if at least 2 monitors are involved
- call XMoveWindow before setting the _NET_WM_STATE_FULLSCREEN property
2015-11-04 15:01:31 +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 ace5bba0ed Cleanup unnecessary/unintended changes from last commit 2015-10-15 19:10:04 -05: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 cc676c4468 Remote app support
All window state order offsets are signed according to the RDP spec, lets treat them as such.
2015-10-15 18:18:21 -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 d1a8119dac RemoteApp support
Remove use of WindowRects to affect window shape, the VisibilityRects are used for this purpose.
2015-10-15 14:47:10 -05:00
bjcollins 5bfbee8f78 Ensure that app windows always get a window type assigned to them. 2015-10-15 14:39:59 -05:00
bjcollins 6934c18adf Continue processing all other window orders for new remote app windows instead
of existing after only looking at part of the information. For instance, window visibility
rects are part of the message with the new order and were being ignored.
2015-10-15 14:35:07 -05:00
bjcollins 964f0addbf Do not support fullscreen toggle keyboard sequence in remote_app mode. There is no support in interface for this
and the fullscreen code is not designed to handle remote app windows.
2015-10-15 14:31:15 -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
Marc-André Moreau 029cbf3aca libfreerdp-gdi: fix egfx multimon support 2015-10-13 15:50:39 -04:00
Marc-André Moreau 4ab373aced xfreerdp: fix multiple egfx context support in X11 GFX 2015-10-13 14:49:30 -04:00
volth 2b7681da85 Update xf_keyboard.c
With Japanese physical keyboard and English layout, pressing the extra keys can cause FreeRDP crash.
2015-09-23 18:40:34 +00:00
bjcollins 47c260177c fix window title for rail as it was not being set on initial window creation
remove duplicate call to XStoreName when setting window title
expand WITH_XEXT #define for rail window rects as extra unecessary work was being done when WITH_XEXT was not defined
2015-09-18 16:14:30 -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
Peter Harris 5f2f68f0e7 xfreerdp: Fix window shape
Don't abort the entire xf_rail_window_common function when the window is
already in the correct location.

To reproduce:
 - move an application off the edge of the screen
 - resize the window to cause a shape to be set
 - move the application window fully on the screen
 - resize the application window larger
 - note lack of drawing in newly enlarged portion of window

Bug introduced in abf6d4f71e "xfreerdp:
prepare RAIL migration away from libfreerdp-rail" when
xf_rail_MoveWindow was copy-and-pasted into xf_rail_window_common
without noticing that the "return" would omit the rest of the combined
function, not just the portion that was pasted.
2015-09-10 18:15:55 -04:00
Peter Harris 769ac2d35f Fix drawing with negative window origin
Since REGION16 uses unsigned values, when appWindow->x or appWindow->y
is negative, the region will have a very large left or top value.

Avoid this problem by clamping to 0 before casting to an unsigned value.
2015-09-03 18:48:42 -04:00
Armin Novak 551eca246b Ignoring H264 decompression failures.
When connecting to windows 8.1 machines the remote RDP server
implementation sometimes sends invalid H264 data. To avoid client
disconnections ignore the broken updates.
2015-09-03 12:11:15 +02:00
Norbert Federa 2d5e249eff Merge pull request #2825 from akallabeth/pointer_decoding_fix
Fixed color pointer decoding.
2015-09-01 11:09:42 +02:00
Martin Haimberger 52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Martin Haimberger 420a86e1c7 Merge remote-tracking branch 'upstream/master' into mh-channel-fix
Conflicts:
	channels/drdynvc/client/drdynvc_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	client/X11/xf_gfx.c
2015-08-25 00:07:04 -07:00
Armin Novak 4a62e6bee4 Added length arguments and checks. 2015-08-06 11:24:42 +02:00
Armin Novak 416ac0baea Fixed return and argument checks. 2015-08-05 17:32:46 +02: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
Marc-André Moreau 5cb06ecc68 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-07-28 09:21:33 -04: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
MartinHaimberger b06d83ba80 Merge pull request #2766 from akallabeth/snprintf_to_sprintf_s
Replaced snprintf with sprintf_s
2015-07-15 09:47:43 +02: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
Marc-André Moreau 3781e803ed channels/rdpgfx: improve frame ack handling 2015-07-06 16:28:52 -04:00
Armin Novak cf9f975341 Replaced snprintf with sprintf_s 2015-07-03 13:26:15 +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
Bernhard Miklautz f24240630d Merge pull request #2759 from bmiklautz/fix/cliprdp
x11/cliprdr: handle empty format names
2015-07-02 16:28:55 +02:00
Bernhard Miklautz b6a799e5d0 x11/cliprdr: handle empty format names
The recently added strdup checks ignored the fact that format names
can be NULL.
2015-07-02 15:39:35 +02:00
ilammy 1012bccdaa client/x11: do not discard events when updating EGFX surface mapping
Passing True to XSync() discards any pending X11 events. Occasionally
this caused ButtonRelease or KeyRelease to be lost and not forwarded
to the remote computed, leading to stuck keys and buttons.

This should resolve issue #2391
2015-06-30 12:48:08 +03:00
Norbert Federa ac95b7274e Merge pull request #2727 from akallabeth/leak_fixes_reformat
Fixed leaks, NULL dereferences and broken init.
2015-06-26 15:01:08 +02:00
Marc-André Moreau ddf2519f1e Merge pull request #2719 from bmiklautz/pull/2481
OSS, tsmf, usb and BSD fixes and improvements
2015-06-26 08:27:22 -04:00
Armin Novak 6698e24228 Fixed leaks, NULL dereferences and broken init. 2015-06-23 21:29:21 +02:00
Armin Novak 5a5ed77c57 Added /from-stdin 2015-06-23 14:59:54 +02:00
Armin Novak d83af81295 Fixed uninitialized value. 2015-06-23 12:12:16 +02:00
Bernhard Miklautz 421b74e85e client/locale: properly check popen return value
popen returns NULL if an error occurs and not < 0.
2015-06-22 19:23:58 +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 dc68bdfce5 channel rdpgfx hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger 6348e41479 channel rdpei hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger d7636d0e28 channel rail hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger b9853f87eb channel encomsp hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger e5d5cd3c94 hardend cliprdr
hardend cliprdr server and client
also updated all callbacks in the server and client
implementations
2015-06-18 03:04:31 -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
Hardening 29de9b6d4e Merge pull request #2658 from hardening/fix_2657
Fix for #2657
2015-05-29 17:58:30 +02:00
David FORT 12f873f1f9 Fixed MessageQueue and callers 2015-05-29 14:24:14 +02:00
ivan-83 94a7abd2af + tsmf: OSS initial suppot (not work yet)
* tsmf: fix video playback on FreeBSD (proper shared object name)
* tsmf: renamed args: audio->sys, audio-dev->dev
* audin: OSS fix, now it work
* cmdline: add syntax help for /audin, /rdpsnd, /tsmf
* add debug messages
2015-05-27 22:54:13 +03:00
David FORT 85c350f5da Fix for #2657 2015-05-27 15:13:43 +02:00
Marc-André Moreau b9c1cddc2e Merge pull request #2583 from bceverly/OpenBSD-cleanup
Two minor source code changes to remove warnings
2015-05-21 10:17:54 -04:00
Norbert Federa cd0a8e0506 Merge pull request #2630 from hardening/new_2616
Add checks for some XXX_New and XXX_Add functions
2015-05-21 16:04:26 +02:00
David FORT b83af4c059 Fixed declaration of xf_event_action_script_init() 2015-05-20 21:01:46 +02:00
David FORT 29d372480a Take in account nfedera's review 2015-05-20 19:19:50 +02:00
Norbert Federa 4d661fdb35 client/x11: fix + simplify invalidate_poly_region 2015-05-19 01:13:40 +02:00
Hardening f8120919af Add checks for some XXX_New and XXX_Add functions
Based on PR #2616
2015-05-18 11:28:00 +02:00
Norbert Federa 1b5abec683 client/x11: fixed if statements with empty body 2015-05-17 18:24:11 +02:00
MartinHaimberger e3236c2317 Merge pull request #2605 from nfedera/fix-2015-05-08-01
fixed multiple missing gdi return value checks
2015-05-11 16:59:32 +02:00
Norbert Federa 1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +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
Bryan Everly df9ae5e31b Changed the xf_tsmf.c code to test for zero visible rectangles for all platforms. Modified arc4random() change to actually have a skeletal implementation in winpr for BCryptGenRandom() on all platforms. 2015-04-30 10:12:37 -04: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
Bryan Everly 6ed90e831e Fixed linker warning about insecure crypto and fixed compiler warning about unsigned being compared to less than zero 2015-04-28 10:50:29 -04:00
Marc-André Moreau 1fea6bf702 Merge pull request #2568 from nfedera/fix-2015-04-23-01
codec/rfx: error checking and various fixes
2015-04-24 13:36:27 -04:00
Bryan Everly 18b335e2f2 Added support for manpage construction for OpenBSD 2015-04-24 08:38:35 -04:00
Norbert Federa 84577b1ca7 codec/rfx: error checking and various fixes
- removed some unneeded null checks for free()
- fixed a memory leak in shadow_client
- removed rfx_compose_message_header from API

Changed the following functions to BOOL, check the result
where they are called and handle failures:
- rfx_compose_message
- rfx_compose_message_header
- rfx_write_tile
- rfx_write_message_tileset
- rfx_write_message_frame_begin
- rfx_write_message_region
- rfx_write_message_frame_end
- rfx_write_message

rfx_process_message:
- check memory allocation failures
- verify protocol-conform order of data messages to prevents memory
  leaks caused by repeated allocations
- verify that header messages were parsed/received before the
  data messages
- treat unknown rlgr mode as error
- fixed/added error handling
- fixed all callers to check/handle result

rfx_encode_message:
- fixed incorrect usage of realloc
- missing malloc check
- missing check of CreateThreadpoolWork
- correct cleanup on failure (threadpool, memory)
- check rfx_encode_message result

rfx_encode_messages:
- check rfx_split_message result
- correct cleanup on failure
- prevent memory leak on failure

rfx_write_message_context:
- fixed invalid channelId value (must be 0xFF for WBT_CONTEXT)

rfx_process_message_codec_versions:
- fixed invalid read size of codec_version (it is 16bit)

rfx_process_message_channels:
- verify protocol conform channelId value

rfx_process_message_region:
- replaced invalid reallocs with malloc
- read and verify regionType and numTileSets from stream

rfx_process_message_tileset:
- check allocation results
- fixed incorrect usages of realloc

setupWorkers:
- fixed incorrect usages of realloc

rfx_split_message:
- removed dead code
- missing malloc check

rfx_compose_message:
- fixed a memory leak
- check/handle rfx_encode_message result
2015-04-23 15:42:21 +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
Bryan Everly 8c75127a67 Necessary changes to get latest branch working on OpenBSD 5.6 2015-04-21 14:42:06 -04:00
Bernhard Miklautz 1e6943bf31 Fix formating 2015-04-21 14:20:24 +02:00
Bernhard Miklautz db81151ea4 gdi: fix broken return type checks
Integrates comments from pull request.
2015-04-21 14:18:07 +02:00
Bernhard Miklautz 2c072d33d3 Fix GDI return values and other fixes
* top level GDI functions return 0 on error and != 0 otherwise but the
  low level functions (16bpp.c, 8bpp.c 32bpp.c) which are called did it
	exactly the other way around. Those were adapted.
* change gdi_InvalidateRegion to BOOL and check calls where appropriate
* integrate comments from pull request
2015-04-21 14:18:07 +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 b3b8306724 xfreerdp: removed unused variables from xf_monitor 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
Bernhard Miklautz 3c7662517c hardening
Start to add missing checks for:
* *alloc
* *_New
2015-03-25 17:38:21 +01:00
Armin Novak c380fb3520 Added flag to ignore unknown keywords
freerdp_client_settings_parse_command_line now allows ignoring
unknown keywords.
2015-03-16 10:15:37 +01:00
Marc-André Moreau 5ab34dfa3e Merge pull request #2456 from zhangzl2013/fix-realloc
Fix incorrect usage of realloc
2015-03-12 07:33:27 -04:00
Marc-André Moreau 719a0fd3e9 Merge pull request #2426 from bjcollins/master
xfreerdp fullscreen enhancements
2015-03-12 07:27:29 -04:00
Zhang Zhaolong 855b1201aa xf_cliprdr: fix incorrect usage of realloc.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-11 12:31:50 +08:00
Seray Rosh ffa7f0363f release keys when xfreerdp is unfocused to prevent stuck keys 2015-02-27 16:02:40 +01: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 991f7b347d libfreerdp-core: further abstract multiple connections used internally by tsg from rdpTransport 2015-02-15 10:06:17 -05:00
bjcollins ee8d0a6440 Fix remote app in xfreerdp.
Remove use of the visibleOffset, this completely breaks the display of all windows except for the main application window. Instead,
just maintain a local offset correction of the windowOffset.

Apply workaround to determining the workArea for remote app mode.
2015-02-11 17:24:06 -06:00
Marc-André Moreau 22ac46957a xfreerdp: fix egfx multimonitor support 2015-02-10 16:32:07 -05: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 8b524021f1 xfreerdp: fix egfx multimon on reconnect 2015-02-06 17:46:15 -05:00
Marc-André Moreau 82d58086db xfreerdp: partial reconnect fixes 2015-02-05 17:01:56 -05:00
Bernhard Miklautz 5558f7cd54 xfreerdp: fix problem with SetPosition
Since XWarpPointer generates an pointer motion event, as if the mouse
was moved by hand, xfreerdp sends back the received mouse position to
the server. This behavior is wrong since pointer positions set via
server pointer update pdu shouldn't get sent back to the server
(it's not a "real" mouse move).

To fix this problem change the x windows event mask to not handle
pointer motion events before setting the new pointer position and change
it back again afterwards.

Possible downside of this is that some pointer motion events might get
lost but this shouldn't be noticeable.

Thanks to nfedera for the neat idea ;).
2015-02-03 22:08:34 +01:00
Bernhard Miklautz 823dbb1dd0 xfreerdp: add support to set pointer 2015-02-02 15:32:49 +01:00
Marc-André Moreau 7c6948cd5c xfreerdp: make use of freerdp_get_event_handles 2015-01-30 09:47:02 -05:00
Armin Novak dd9e1879b6 Updated h264_decompress arguments. 2015-01-22 13:24:33 +01: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
Norbert Federa 344362a8a3 clients: fix "focus in event" issues
The input->FocusInEvent callback implementations (normal and fast-path) have
always sent the mouse position even if the pointer was outside of the freerdp
client area. In addition xfreerdp used the wrong pointer coordinates which
were relative to the root window instead of its own.
On focus-in the pointer position must only be sent if the pointer is
currently within the program's client area. However, the clients had no way
to pass that information to input->FocusInEvent which required an API change.

- removed mouse pointer x, y parameters from input interface's FocusInEvent
- clients are responsible to call input->MouseEvent on focus-in if necessary
- fixed xfreerdp and wfreerdp accordingly
2015-01-16 18:40:57 +01:00
Bernhard Miklautz 5d4de15401 xfreerdp: fix crash with /monitor-list
Catch the case when /monitor-list was used but the X display couldn't
be opened or wasn't available.
2015-01-16 00:10:36 +01:00
Armin Novak e10b42e305 Fixed typo. 2015-01-15 15:26:43 +01:00
Armin Novak 9767f7f042 Added patch for UTF8 window titles, fixes #1364 2015-01-15 14:25:43 +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 b552aa9363 libfreerdp-core: add support for multiple redirection target addresses 2014-12-27 18:53:27 -05:00
Marc-André Moreau 5e6b3de74e xfreerdp: fix usage of incorrect target clipboard format id 2014-12-26 11:30:09 -05:00
Marc-André Moreau e6eeae2ddd xfreerdp: fix clipboard null byte at end of string (issue #2209) 2014-12-21 13:49:22 -05: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
Marc-André Moreau b579ad3cec Merge pull request #2261 from akallabeth/more_memleak_fixes
More warning and memleak fixes
2014-12-11 08:28:48 -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
Armin Novak 23d64bd6ca Fixed uninitialized value. 2014-12-07 00:29:28 +01:00
erbth 9f068ca0f7 fixed shutdown of input thread in xfreerdp 2014-12-05 21:48:24 +01:00
Norbert Federa 443ee42db5 gdi: don't pollute invalid region with empty rects 2014-12-05 19:47:29 +01:00
Marc-André Moreau d5414c33a5 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-12-04 13:32:59 -05:00
Marc-André Moreau f2267a2277 libwinpr-clipboard: fix memory corruption and leaks 2014-12-04 13:19:10 -05:00
Norbert Federa 415a0a158e xfreerdp: smart sizing fix
Standard format PictStandardRGB24 is not always available.
Use XRenderFindVisualFormat instead of XRenderFindStandardFormat
2014-12-04 17:52:54 +01:00
Marc-André Moreau 75e0e84130 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-12-04 10:00:10 -05:00
Norbert Federa c82d8c9c6b xfreerdp: fix cliprdr SelectionNotify enless loop
xf_cliprdr_process_selection_notify calls xf_cliprdr_send_client_format_list
if the SelectionNotify event property was None.
xf_cliprdr_send_client_format_list called XConvertSelection even if there
was no clipboard owner. In that case the XServer generates a SelectionNotify
event to the requestor (us) with property None and so on ...

The most obvious fix is to ensure that XConvertSelection is not called if
the owner is None which is done in this commit.
2014-12-04 00:19:23 +01:00
Marc-André Moreau fdd2dc7601 freerdp: patch valgrind leaks, cleanup 2014-12-03 14:17:27 -05:00
Bernhard Miklautz 7b55c3a48e xfreerdp: fix formating - indentation 2014-12-03 18:23:20 +01:00
Bernhard Miklautz bd8c3f448e xfreerdp: fix a possible re-size race condition
In case of server side initiated desktop resize it could happen that the
client was "scaling" even if smart-sizing was disabled. The reason for
this was that the "scaled" width and height was set when the X Configure
event arrived but not in xf_desktop_resize.
2014-12-03 18:08:01 +01:00
Marc-André Moreau 01ac15a879 libfreerdp-core: fix crash on failed redirect 2014-12-03 11:48:27 -05:00
Norbert Federa 0e443484d8 xfreerdp: smart-sizing and software-gdi fixes
* fixed crash on server-initiated desktop resize and fullscreen toggle with /gdi:sw
* implemented desktop resize for /gdi:sw
* check for availibility of XRender extension and show error messages if a setting would require it
* fixed compile error if xrender devel packages are missing
* fixed bug with server-initiated desktop resize in fullscreen mode
2014-12-03 15:41:10 +01:00
Norbert Federa 25f66d2e6d xfreerdp: added smart sizing, mt gesture fixes
- removed setting ScalingFactor
- added settings SmartSizingWidth and SmartSizingHeight
- changed option /smart-sizing to optionally support <width>x<height>
- consolidated transformation of input event coordinates
- rdp8 gfx ignored scaling and panning offsets: fixed
- never resize window on panning/pinching
- simplified keyboard multitouch gesture debugging emulation
- disabled keyboard multitouch gesture emulation debug code via define
2014-12-01 11:56:44 +01:00
Norbert Federa 85297fb343 xfreerdp: remove duplicated drawing operations
Most of xfreerdp's hw gdi callbacks did the the same X11 drawing operation
twice: Initially on the primary pixmap to keep the back buffer up to date
and then directly on the window in order to see the result.
This sequence is followed by a call to gdi_InvalidateRegion() to mark the
rectangular area of the drawing operation.
Since in xfreerdp's current design (or better current evolved state) the
backbuffer pixmap is obligatory, all drawing operations directly targeting
the window are redundant because of the subsequent EndPaint (mapped to
xf_hw_end_paint) where the damaged region is copied from the backbuffer
to the drawable.

- removed X11 drawing operations which directly target the window drawable
- fixed some errors in the calculation of the required update regions
2014-12-01 11:19:27 +01:00
Norbert Federa 3fa3384eb4 xfreerdp: several fixes for panned/pinched drawing
- use bilinear filter instead of nearest filter
- fixed invalid transformation matrix
- support non-proportional scaling
- fix calculation of transformed coordinates (rounding errors)
2014-12-01 11:17:16 +01:00
Marc-André Moreau c26b557ab4 Merge pull request #2215 from nfedera/fix-2014-11-16-01
xfreerdp: fix polyline
2014-11-17 09:41:07 -05:00
Armin Novak a2bbb265c1 Fixed memory leaks. 2014-11-17 00:36:01 +01:00
Armin Novak bfd3962f03 Fixed memory leak. 2014-11-17 00:26:33 +01:00
Norbert Federa 84a4514ca9 xfreerdp: fix polyline
X11 gdi polyline has been broken by commit 3de5c62.
We don't need to convert the point coordinates if XDrawLines is called with
coordinate mode CoordModePrevious.
2014-11-16 18:48:14 +01:00
Armin Novak 7eb6bc112b Fixed dereference of NULL pointer. 2014-11-16 16:44:29 +01:00
Armin Novak e20da04d15 Fixed uninitialized argument value. 2014-11-16 15:37:13 +01:00
Marc-André Moreau b32341785e xfreerdp: remove dependency on libfreerdp-rail 2014-11-12 19:49:35 -05:00
Marc-André Moreau 6857a4f2b7 xfreerdp: remove old X11 RAIL code 2014-11-12 17:18:27 -05:00
Marc-André Moreau 2efa67b4f9 xfreerdp: more RAIL libfreerdp-rail migration 2014-11-12 17:00:57 -05:00
Marc-André Moreau abf6d4f71e xfreerdp: prepare RAIL migration away from libfreerdp-rail 2014-11-12 16:42:32 -05:00
Marc-André Moreau 589c21d819 libfreerdp-utils: remove rail utils 2014-11-12 10:18:53 -05:00
Marc-André Moreau 1225c6b5ce xfreerdp: separate app windows from desktop windows 2014-11-11 22:27:33 -05:00
Marc-André Moreau fb5e33440c xfreerdp: cleanup xf_window.c, xf_rail.c 2014-11-11 20:26:47 -05:00
Marc-André Moreau d955851052 xfreerdp: remove RAIL dependency on deprecated event system 2014-11-11 18:32:18 -05:00
Marc-André Moreau f3d1830eb4 xfreerdp: partially migrate RAIL to callback interface 2014-11-11 17:49:29 -05:00
Marc-André Moreau b2f7c488ab xfreerdp: cleanup and fix RemoteApp 2014-11-11 16:35:30 -05:00
Marc-André Moreau ee7299ec3f channels/tsmf: remove dependency on deprecated eventing system 2014-11-10 16:33:34 -05:00
Marc-André Moreau edd4aa797c xfreerdp/tsmf: migrate to callback interface 2014-11-10 16:23:04 -05:00
Marc-André Moreau 129582e67f channels/tsmf: cleanup 2014-11-10 14:02:54 -05:00
Marc-André Moreau f9814379cd xfreerdp: remove usage of XAllocColor (slow) 2014-11-10 11:15:37 -05:00
Marc-André Moreau a6bb185760 channels/tsmf: add new callback interface 2014-11-07 18:33:45 -05:00
Hardening 7b108f1aa8 Merge pull request #2141 from zhangzl2013/polyline
fix polyline.
2014-10-31 22:15:13 +01:00
Martin Fleisz 0be28ba0f6 Merge pull request #1965 from akallabeth/dynamic-addin-naming
Dynamic channel library naming
2014-10-31 13:42:16 +01:00
Norbert Federa 62dbcac0c7 xfreerdp: fix glyph index primary drawing order
The fOpRedundant field of the GlyphIndex primary drawing order
(MS-RDPEGDI, chapter 2.2.2.2.1.1.2.13) was neglected which resulted in some
severe text rendering errors.
2014-10-29 20:56:26 +01:00
Marc-André Moreau 23e4963102 xfreerdp: remove dependency on clrconv 2014-10-21 22:19:11 -04:00
Marc-André Moreau 5f95f0776f libfreerdp-codec: add freerdp_image_copy_from_monochrome replacement function for deprecated freerdp_mono_image_convert 2014-10-21 21:56:10 -04:00
Marc-André Moreau 0aab1e7ee5 libfreerdp-codec: fix and enhance cursor image conversion 2014-10-21 20:46:15 -04:00
Marc-André Moreau 27dca6258a xfreerdp: replace wire to local clipboard conversion 2014-10-17 20:55:12 -04:00
Marc-André Moreau 83ecddd6c1 xfreerdp: replace cliprdr to wire format conversion 2014-10-17 20:40:11 -04:00
Marc-André Moreau a1e660d92e freerdp: unify clipboard standard format id definitions 2014-10-16 22:20:12 -04:00
Marc-André Moreau 334dec3c1f winpr: add pragma pack, bitmap + clipboard definitions 2014-10-16 21:45:47 -04:00
Marc-André Moreau f6b3b24c22 winpr: add new line ending, utf16 byte order swap functions 2014-10-16 18:07:44 -04:00
Marc-André Moreau d668855be6 xfreerdp: refactor cliprdr helpers 2014-10-16 15:05:06 -04:00
Marc-André Moreau 4111625488 xfreerdp: cleanup unused cliprdr code 2014-10-15 22:56:25 -04:00
Marc-André Moreau 2e82e6d22d xfreerdp: fix clipboard sync 2014-10-15 22:48:18 -04:00
Marc-André Moreau 38bac22204 xfreerdp: migrate to cliprdr callback interface 2014-10-15 21:30:11 -04:00
Marc-André Moreau 4ba0010294 xfreerdp: partially migrate to cliprdr callback interface 2014-10-15 17:42:55 -04:00
Marc-André Moreau 7a5d45ed34 xfreerdp: further cliprdr refactoring 2014-10-15 15:49:57 -04:00
Marc-André Moreau 94da63f980 xfreerdp: start migrating to cliprdr callback interface 2014-10-14 22:58:01 -04:00
Marc-André Moreau 0abe24a1c0 xfreerdp: start refactoring cliprdr 2014-10-14 22:24:07 -04:00
Zhang Zhaolong 3de5c62bf3 fix polyline. 2014-10-09 18:11:38 +08:00
Bernhard Miklautz 36c2523d68 xfreerdp: add support to set keyboard indicators
* add generic function to check for X extensions
* detect x keyboard support
* add callbacks and client code to set/clear keyboard indicators
2014-10-06 10:37:37 +02:00
Bernhard Miklautz d7a3d78279 xfreerdp: add support for PlaySound
Using X keyboard bell.
2014-10-03 16:04:15 +02:00
Marc-André Moreau 2a5192b027 Merge branch 'master' of github.com:awakecoding/FreeRDP into egfx
Conflicts:
	client/Windows/wf_cliprdr.h
	client/Windows/wf_event.h
	client/X11/xf_client.c
	client/X11/xf_gdi.c
	libfreerdp/gdi/gdi.c
	server/Mac/mf_input.c
2014-09-17 19:09:56 -04:00
Marc-André Moreau 73471eb1f0 libfreerdp-gdi: fix 8bpp mode 2014-09-17 18:30:09 -04:00
Marc-André Moreau 48b35be953 xfreerdp: fix X11 16bpp mode 2014-09-17 14:29:56 -04:00
Marc-André Moreau fb4e5d352b libfreerdp-codec: add proper 16bpp output format support 2014-09-17 12:17:41 -04:00
Armin Novak 059374457d Removed library prefix override. 2014-09-17 11:27:11 +02:00
Marc-André Moreau 1b7a84419c xfreerdp: partial fix for X11 16bpp mode 2014-09-16 19:12:26 -04:00
Marc-André Moreau c40d8155a6 libfreerdp-gdi: fix SurfaceToSurface overlapping copies 2014-09-16 17:41:24 -04:00
Marc-André Moreau b25258e8c6 libfreerdp-gdi: add support for ABGR plain colors 2014-09-15 16:28:53 -04:00
Marc-André Moreau 501386b790 libfreerdp-gdi: partial support for internal ABGR buffer format 2014-09-15 16:08:06 -04:00
Armin Novak 417e57d846 Decreased logging verbosity. 2014-09-15 19:49:34 +02:00
Armin Novak 7913a57bc5 Using wlog for logging in clients now. 2014-09-15 08:55:00 +02:00
Marc-André Moreau f693ff42d7 Merge pull request #2097 from awakecoding/egfx
GDI Bitmap Update Optimization
2014-09-12 15:12:52 -04:00
Marc-André Moreau 198f94fe03 libfreerdp-gdi: add RDP8 graphics pipeline support 2014-09-12 14:57:44 -04:00
Marc-André Moreau 7130b7064e libfreerdp-gdi: fix bitmap caching 2014-09-12 01:03:19 -04:00
Marc-André Moreau 45d2bab95d xfreerdp: optimize bitmap updates 2014-09-11 22:29:09 -04:00
Marc-André Moreau f5ff6e1bd8 Merge pull request #2095 from bmiklautz/feat/byemonolithic
Remove non-monolithic builds of libfreerdp
2014-09-11 18:46:32 -04:00
Bernhard Miklautz 0313ca3622 libfreerdp: always build "MONOLITHIC"
"libfreerdp" consisted of multiple (small) single libraries. If the cmake
option MONOLITHIC was used only one library was build combining all of
the libfreerdp-* libraries.
The only exceptions to this are libfreerdp-server and libfreerdp-client these
are build as separate libraries.

This commit obsoltes non-monolithic builds and makes monolithic builds
the default. The cmake option MONOLITHIC is also removed.
2014-09-12 00:19:53 +02:00
Bernhard Miklautz c8e8ed60b9 xfreerdp: fix segfault
codec contexts are now generated and freed within core/codecs.c
2014-09-11 17:04:21 +02:00
Martin Fleisz 54b96290c9 Merge branch 'fix_2036' of git://github.com/akallabeth/FreeRDP into akallabeth-fix_2036
Conflicts:
	libfreerdp/codec/test/TestFreeRDPCodecPlanar.c
	libfreerdp/codec/test/TestFreeRDPCodecProgressive.c
	libfreerdp/core/transport.c
	libfreerdp/primitives/test/TestPrimitivesYCbCr.c
2014-09-11 13:03:01 +02:00
Marc-André Moreau 08373c50bc Merge branch 'master' of github.com:FreeRDP/FreeRDP into egfx 2014-09-10 10:44:48 -04:00
Marc-André Moreau c71e4e18a1 libfreerdp-core: refactor codec context management 2014-09-10 00:42:41 -04:00
Armin Novak b22b897389 Reformatted changed files. 2014-09-09 16:32:22 +02:00
Armin Novak 0ec5318c99 Fixed calling of dump functions, new API 2014-09-09 16:31:46 +02:00
erbth cbc8b3a7e1 Merge branch 'egfx' of https://github.com/awakecoding/freerdp into egfx_new
Conflicts:
	channels/drdynvc/client/dvcman.c
	include/freerdp/codec/h264.h
	libfreerdp/codec/h264.c		after this merge h264 doesn't work anymore!!
	libfreerdp/utils/svc_plugin.c
2014-09-08 16:56:45 +02:00
Pavel Tsekov 831375aa47 xfreerdp: use _aligned_free instead of free
Use _aligned_free to release memory allocated with
freerdp_image_convert().

Fixes #2075
2014-09-08 15:00:47 +02:00
Marc-André Moreau bd516e04fa libfreerdp-primitives: cleanup YCoCg 2014-09-06 21:13:37 -04:00
Marc-André Moreau f14b0e0195 libfreerdp-codec: cleanup h264 decoder 2014-09-05 19:11:03 -04:00
Marc-André Moreau 033e75467b Merge branch 'master' of github.com:awakecoding/FreeRDP into egfx 2014-09-05 17:29:35 -04:00
Marc-André Moreau 66bbbf0519 libfreerdp-gdi: enable altsec frame markers 2014-09-05 16:06:19 -04:00
Marc-André Moreau 5107f07b52 Merge pull request #2057 from ptsekov/software-gdi-improvements
Adjust the X11 code to work with the new GDI color
2014-09-05 15:05:53 -04:00
Pavel Tsekov cdfcbeff5c X11: Convert GDI color to X11 color troughout.
* client/X11/xf_client.c (xf_pre_connect): Set the field `colormap' of
`struct xfContext' to the default colormap.
* client/X11/xfreerdp.h (xf_gdi_get_color): Declare new external function.
* client/X11/xf_gdi.c (xf_gdi_get_color): Define new external function.
Use xf_gdi_get_color() to get the appropriate X color index from the GDI
color representation.
* client/X11/xf_graphics.c: Likewise.
2014-09-04 12:44:03 +03:00
Marc-André Moreau 1491c5a7f9 libfreerdp-codec: initial partial upgrade tile support 2014-09-02 19:25:01 -04:00
erbth 25593c7250 H.264: converting only clipping rects to XRGB 2014-09-02 22:16:56 +02:00
Marc-André Moreau 656dd760c5 libfreerdp-codec: fix sub-band diffing 2014-08-26 16:15:22 -04:00
Marc-André Moreau ec53dd612e libfreerdp-codec: fix progressive codec tile drawing offset, fix dequantization 2014-08-25 19:50:42 -04:00
Pavel Tsekov 08d60d01e0 Adjust the code to work with the new GDI color
representation.
* client/X11/xf_gdi.c:
Use freerdp_color_convert_drawing_order_color_to_gdi_color() to convert
from drawing order color representation to GDI color representation
troughout.
* client/X11/xf_graphics.c: Likewise.
2014-08-21 03:35:34 +03:00
Daniel Bungert 27fc3ee64d Fix multiple cases of use of uninitialized vars
* Zeroing xevent helped address some erratic behavior.
* valgrind complained about using xfBitmap uninitialized
  during shutdown, traced it back to the initialization.
  Bitmap_Prototype->size > sizeof(rdpBitmap).
* Early exit from recv_tpkt_pdu is necessary to address
  a shutdown crash - the channelId value was being used
  without being set in the disconnect case.
2014-08-20 03:54:05 -06:00
Marc-André Moreau 68b3d0476b libfreerdp-codec: start work on progressive inverse DWT 2014-08-19 14:48:09 -04:00
Marc-André Moreau 1a8c763309 Merge branch 'shadow' of github.com:awakecoding/FreeRDP 2014-08-18 17:06:13 -04:00
Ron Yaari 1b819067b0 X11: fix toggle-fullscreen option functionality 2014-08-18 10:41:40 +03:00
Idan Freiberg 27f5eaba88 Revert "X11: fix toggle-fullscreen option functionality"
This reverts commit 0c84c81401.
2014-08-18 10:39:47 +03:00
Ron Yaari 0c84c81401 X11: fix toggle-fullscreen option functionality 2014-08-18 10:19:47 +03:00
Norbert Federa 3c8700f62d Merge pull request #1963 from akallabeth/async-update-to-lib
Moved update thread from client to library.
2014-08-14 17:46:43 +02:00
erbth 095a7aba99 OpenH264 YUV data conversion with intel SSSE3 in assembly 2014-08-13 20:56:40 +02:00
Marc-André Moreau e4a4aa4d3a Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow
Conflicts:
	channels/encomsp/client/encomsp_main.c
	libfreerdp/core/tcp.c
	libfreerdp/crypto/certificate.c
	server/Windows/CMakeLists.txt
	server/X11/xf_cursor.c
	server/X11/xf_input.c
	server/X11/xf_interface.c
	server/X11/xf_monitors.c
	server/X11/xf_peer.c
2014-08-11 19:22:33 -04:00
Marc-André Moreau cff9c16c1e Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	channels/disp/client/disp_main.c
2014-08-11 10:36:07 -04:00
Marc-André Moreau 067da290dd Merge pull request #2027 from akallabeth/winpr-log
Replace stdout and logging defines with WLog, add logcat support
2014-08-11 10:38:28 -04:00
erbth a8257b5201 fixed some memory leaks arround DVC and RDPEGFX 2014-08-08 15:19:49 +02:00
Armin Novak 0780c0993e Replaced fprintf(stderr with DEBUG_WARN 2014-08-07 22:21:07 +02:00
Marc-André Moreau 3895c930a3 Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow 2014-08-05 09:56:12 -04:00
erbth 64501b895b Merge branch 'egfx' of https://github.com/awakecoding/freerdp into egfx
Conflicts:
	libfreerdp/codec/h264.c (deleted in my repo in order to get complete remote file)
2014-07-30 13:11:05 +02:00
erbth 20e76411dc H.264 hack and first port of YUV to XRGB format conversion to assembly 2014-07-29 21:42:04 +02:00
Marc-André Moreau a3de93d867 libfreerdp-codec: start parsing progressive codec 2014-07-28 23:41:16 -04:00
Marc-André Moreau 780079d629 Merge branch 'master' of github.com:awakecoding/FreeRDP into egfx 2014-07-28 16:59:29 -04:00
Daryl Poe 3794720455 correct Pause key sequence
(cherry picked from commit 46a00b5c9e)
2014-07-25 11:31:50 +02:00
erbth 9501b6c58e OpenH264 first frame decode fix 2014-07-17 16:25:34 +02:00
Marc-André Moreau e7fb6e67f5 shadow: add basic lobby functionality 2014-07-14 18:01:29 -04:00
Armin Novak 689902c995 Moved update thread from client to library. 2014-07-14 19:27:50 +02:00
Armin Novak ad3255354d Added WITH_LIBRARY_VERSIONING, allowing to build shared libraries without
SOVERSION information. (required by Android)
2014-07-11 11:53:58 +02:00
Bernhard Miklautz 6a49bcfe40 winpr: always build "monolitic"
winpr is now always build as single library.
The build option MONOLITHIC_BUILD doesn't influence this behavior anymore.

The only exception is winpr-makecert-tool which is still build as extra
library.

This obsoletes complex_libraries for winpr.
2014-07-10 11:10:58 +02:00
Marc-André Moreau 03c91a92d1 libfreerdp-codec: add more egfx h264 debugging 2014-07-09 16:41:36 -04:00
Marc-André Moreau 10f8a0a45b xfreerdp: start using regionRects in egfx h264 decoding 2014-07-08 18:04:24 -04:00
Marc-André Moreau 6f1acb01dd channels/rdpgfx: parse H264 bitmap stream and meta block 2014-07-08 17:37:29 -04:00
Marc-André Moreau ac7d23b9a3 libfreerdp-gdi: migrate to _aligned_malloc/_aligned_free 2014-07-08 15:07:19 -04:00
Marc-André Moreau c16000e67b Merge branch 'master' of github.com:FreeRDP/FreeRDP into egfx 2014-07-08 12:29:30 -04:00
Marc-André Moreau 8516846999 libfreerdp-client: cleanup gfx options 2014-07-08 12:29:08 -04:00
Norbert Federa 196330111b xfreerdp: xfixes selection ownership notification
The X11 core protocol does not have support for selection ownership
notifications. Until now xfreerdp worked around this issue by always sending
a format list pdu to the server after sending the format data response pdu
which makes the server side think that the clients clipboard data has changed.

This workaround has some severe drawbacks:
* it causes unnecessary data transfers because even without local clipboard
  data changes the same data is always re-transferred over the channel
* with some clipboard managers (in the server sessions) you will get massive
  endless data transfer loops because these managers immediately request the
  data on clipboard changes.

The correct (core X11) way would be polling for selection ownership changes
which must include the ability to detect changes to the TIMESTAMP target if
the selection owner did not change.
The alternative to the poll based approach is using the X Fixes extension in
order to get selection ownership notifications.

This commit adds support for the XFIXES solution and also moves the complete
clipboard related event handling from xf_event.c to xf_cliprdr.c
2014-07-07 20:31:23 +02:00
Marc-André Moreau bde954107d Merge branch 'egfx' of github.com:vworkspace/FreeRDP into egfx
Conflicts:
	client/X11/xf_gfx.c
2014-07-03 12:03:39 -04:00
Mike McDonald 4d3d78c487 Initial implementation of H.264 decoder for MS-RDPEGFX 2014-07-01 23:28:09 -04:00
Marc-André Moreau 4a4f4308b5 libfreerdp-codec: improve ClearCodec error checking 2014-07-01 16:32:36 -04:00
Marc-André Moreau f304d8cc20 libfreerdp-codec: more ClearCodec vBar caching 2014-07-01 14:38:54 -04:00
Marc-André Moreau 8a5591bdef libfreerdp-codec: add ClearCodec glyph cache 2014-07-01 09:55:52 -04:00
Marc-André Moreau 78e00db45d Merge branch 'egfx' of github.com:awakecoding/FreeRDP into egfx
Conflicts:
	libfreerdp/codec/test/TestFreeRDPCodecClear.c
2014-07-01 09:11:50 -04:00
Marc-André Moreau ff816feb72 Merge branch 'master' of github.com:FreeRDP/FreeRDP into egfx 2014-07-01 09:01:52 -04:00
Marc-André Moreau e42465372a xfreerdp: initial remote assistance controls (ctrl+alt+c to request/release control) 2014-06-30 17:17:06 -04:00
Marc-André Moreau 49cd7806d9 libfreerdp-codec: improve ClearCodec decompressor 2014-06-26 17:08:51 -04:00
Marc-André Moreau dd36617093 libfreerdp-codec: improve clear_decompress function parameters 2014-06-25 18:39:28 -04:00
Marc-André Moreau c20c3abdf1 xfreerdp: fix egfx SurfaceToSurface off-by-one 2014-06-25 18:00:48 -04:00
Marc-André Moreau 95a0d96b58 xfreerdp: fix build warnings 2014-06-23 12:08:34 -04:00
Marc-André Moreau 78d3c82798 xfreerdp: fix multiple egfx-related memory leaks 2014-06-20 13:52:13 -04:00
Marc-André Moreau ce6ff35297 xfreerdp: fix egfx off-by-one errors 2014-06-19 17:08:50 -04:00
Marc-André Moreau 160a3c4b61 libfreerdp-codec: avoid intermediate copy with planar egfx 2014-06-19 13:55:34 -04:00
Marc-André Moreau 57b0e4d010 libfreerdp-codec: handle flipping in planar decompression 2014-06-19 13:08:07 -04:00
Marc-André Moreau 425763d30a libfreerdp-codec: start offering more flexible planar codec decompression 2014-06-17 16:44:24 -04:00
Marc-André Moreau d69316198f xfreerdp: add egfx support for planar codec 2014-06-17 16:15:30 -04:00
Marc-André Moreau 61eb7f2f8e libfreerdp-codec: fix ClearCodec decoding 2014-06-13 17:30:13 -04:00
Marc-André Moreau eeb7cd2cb2 xfreerdp: initial egfx bitmap caching 2014-06-13 08:36:09 -04:00
Marc-André Moreau 27b1e76dbb xfreerdp: fix egfx SurfaceToSurface overlapping copies 2014-06-12 21:02:25 -04:00
Marc-André Moreau 50883e6c83 xfreerdp: fix egfx RemoteFX bitmap updates 2014-06-12 18:23:51 -04:00
Marc-André Moreau ae02b5b512 xfreerdp: start handling egfx surface-to-surface 2014-06-12 16:13:12 -04:00
Marc-André Moreau 42c83c25f8 Merge branch 'egfx' of github.com:awakecoding/FreeRDP into egfx
Conflicts:
	channels/tsmf/client/tsmf_main.c
2014-06-12 12:08:15 -04:00
Marc-André Moreau 6f9a256c5c Merge branch 'master' of github.com:awakecoding/FreeRDP into egfx
Conflicts:
	channels/drdynvc/client/dvcman.c
	client/X11/xf_client.c
	include/freerdp/dvc.h
2014-06-12 12:03:08 -04:00
Marc-André Moreau fbea223ecf channels/gfx: add surface table helper, surface creation/deletion 2014-06-11 17:48:04 -04:00
Marc-André Moreau 2a82684521 channels: cleanup unused freerdp channels global functions 2014-06-11 16:27:31 -04:00
Armin Novak 4325741583 Merge remote-tracking branch 'origin/master' into tsmf-gstreamer-1.0
Conflicts:
	client/X11/xf_client.c
2014-06-11 11:27:08 +02:00
Marc-André Moreau 161e7b0026 libfreerdp-codec: simplify zgfx segment processing 2014-06-05 14:52:27 -04:00
Marc-André Moreau 6ad00125b4 xfreerdp: avoid using XCopyArea 2014-06-05 13:13:47 -04:00
Marc-André Moreau 68221cca73 xfreerdp: improve gfx frame handling 2014-06-05 12:36:01 -04:00
Marc-André Moreau 38ac1fd7b0 xfreerdp: improve graphics pipeline support 2014-06-04 22:49:03 -04:00
Marc-André Moreau 12e6c845eb channels/rdpgfx: cleanup debug output 2014-06-04 22:06:29 -04:00