Commit Graph

74 Commits

Author SHA1 Message Date
Norbert Federa 71a4349928 fixed multiple missing gdi return value checks
mainly gdi_Create* functions
2015-05-08 21:39:23 +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
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
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
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 f9814379cd xfreerdp: remove usage of XAllocColor (slow) 2014-11-10 11:15:37 -05: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 0aab1e7ee5 libfreerdp-codec: fix and enhance cursor image conversion 2014-10-21 20:46:15 -04: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 fb4e5d352b libfreerdp-codec: add proper 16bpp output format support 2014-09-17 12:17:41 -04:00
Marc-André Moreau 1b7a84419c xfreerdp: partial fix for X11 16bpp mode 2014-09-16 19:12:26 -04:00
Marc-André Moreau b25258e8c6 libfreerdp-gdi: add support for ABGR plain colors 2014-09-15 16:28:53 -04:00
Armin Novak 7913a57bc5 Using wlog for logging in clients now. 2014-09-15 08:55:00 +02:00
Marc-André Moreau 7130b7064e libfreerdp-gdi: fix bitmap caching 2014-09-12 01:03:19 -04:00
Marc-André Moreau c71e4e18a1 libfreerdp-core: refactor codec context management 2014-09-10 00:42:41 -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
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
Armin Novak 0780c0993e Replaced fprintf(stderr with DEBUG_WARN 2014-08-07 22:21:07 +02:00
Marc-André Moreau ac7d23b9a3 libfreerdp-gdi: migrate to _aligned_malloc/_aligned_free 2014-07-08 15:07:19 -04:00
Marc-André Moreau 83edc68422 xfreerdp: start integrating graphics pipeline 2014-06-04 18:03:25 -04:00
Marc-André Moreau 5bcdab95ff libfreerdp-codec: partial planar RLE compression support 2013-11-26 22:16:31 -05:00
Marc-André Moreau 68b254014e xfreerdp: fix cursor hidding/showing with multitouch 2013-08-03 16:13:39 -04:00
Marc-André Moreau 863b51f938 freerdp: merge with master 2013-06-28 12:50:24 -04:00
Bernhard Miklautz 03f2b7ea51 client/x11: fixed incorrect size calculation
xf_Bitmap_Decompress used the same calculation like gdi_Bitmap_Decompress
see #1310
2013-06-26 14:35:49 +02:00
Marc-André Moreau bb78fb16f8 xfreerdp: refactor to make use of single xfContext* and remove xfInfo* 2013-06-12 18:57:25 -04:00
Hardening 7701c9d934 Replace printf(...) by fprintf(stderr, ...) 2013-03-28 23:06:34 +01:00
Marc-André Moreau c19c8a40dd libfreerdp-core: fix some async updates race conditions 2013-02-14 17:43:37 -05:00
Marc-André Moreau 5034ad7aa4 xfreerdp: combine X11 updates 2013-02-09 18:10:45 -05:00
Marc-André Moreau 2d38f99db0 libfreerdp-core: add true asynchronous input and update 2013-02-06 21:57:49 -05:00
rdp.effort 4d90284657 Renamed CODEC_ID_NONE to RDP_CODEC_ID_NONE as it is already defined in
avcodecs.h
Fixed a warning in schannel_openssl.c
Added checks for: input, mcs, tpdu, certificate, license
2013-01-12 14:49:01 +01:00
Marc-André Moreau 5e77cefb08 libfreerdp-utils: removed part of the deprecated calls to xzalloc 2012-11-19 23:49:08 -05:00
Marc-André Moreau ebc09d17d8 libfreerdp-core: started refactoring rdpSettings 2012-11-07 10:33:06 -05:00
Marc-André Moreau a3192855bb xfreerdp: fix building without XCursor support 2012-10-27 15:01:22 -04:00
Marc-André Moreau 9d064171a7 freerdp: get rid of old types 2012-10-09 03:26:39 -04:00
Marc-André Moreau 1bf8a45519 freerdp: change uint8, sint8, uint16, sint16 to BYTE, INT8, UINT16, INT16 2012-10-09 03:01:37 -04:00
Marc-André Moreau 1ed644786c freerdp: change boolean type to BOOL type 2012-10-09 02:38:39 -04:00
Marc-André Moreau 5612bc43f8 freerdp: change true/false to TRUE/FALSE 2012-10-09 02:31:28 -04:00
Marc-André Moreau 9909a12af5 libfreerdp-utils: get rid of xmalloc, xrealloc and xfree 2012-10-08 23:21:26 -04:00
Marc-André Moreau e60a092d81 freerdp: fix headers 2012-10-08 23:02:04 -04:00
Marc-André Moreau faa4311232 libwinpr: add proper config.h inclusions 2012-08-14 17:20:53 -04:00
Marc-André Moreau 4b720a6c0d client: merging Mac OS X and Windows client improvements from Jay Sorg 2012-07-31 16:27:42 -04:00
lysannkessler 8c2d46a436 Merge branch 'master' into spikes/hyperv 2012-07-25 19:05:10 +02:00
lysannkessler 6b754ab836 casting context to xfContext in more lines and more code clarity 2012-07-25 19:05:03 +02:00
Jay Sorg ea9e5fcbee codec: use the CODEC_ID_* names instead of magic numbers 2012-07-24 16:54:29 -07:00
Lysann Kessler 9af4d84050 Merge branch 'master' into spikes/hyperv
Conflicts:
	client/X11/xf_graphics.c
2012-07-25 00:10:45 +02:00