Commit Graph

1447 Commits

Author SHA1 Message Date
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
Armin Novak a8a6accc15 Fixed compiler warnings. 2018-10-03 15:16:59 +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 00489ae75b Reworked checks in xf_disp.c 2018-10-02 12:33:52 +02:00
Armin Novak f332779982 Fixed floatbar X11 leak. 2018-10-01 10:50:47 +02:00
Armin Novak 046d2296a0 Fixed floatbar X11 leak. 2018-10-01 10:49:30 +02:00
Armin Novak a5b689b35d Readded override redirect but reset on focus loss. 2018-09-26 12:38:16 +02:00
Armin Novak 316eed1fbf Menus are no longer popup windows but dropdown menus. 2018-09-26 12:38:16 +02:00
Armin Novak fa7902c362 Fixed argument check for floatbar events. 2018-09-26 10:14:51 +02:00
David Fort d0612151f9
Merge pull request #4874 from r-barnett/fix-MonitorLocalShift
MonitorLocalShiftX,Y should be set when 1st monitor from MonitorIds s…
2018-09-26 10:02:49 +02:00
Martin Fleisz a90b74b8dc
Merge pull request #4879 from akallabeth/clip_fix
Fixes for clipboard #4876
2018-09-26 09:37:41 +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 8357f61818 Fixed load/unload for display channel. 2018-09-24 16:44:25 +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 13478c7445 Skip empty server format response. 2018-09-24 12:47:46 +02:00
Armin Novak 897c0c72a7 Unified auto_reconnect functions for all clients. 2018-09-24 10:31:43 +02:00
rbarnett 41664572a5 MonitorLocalShiftX,Y should be set when 1st monitor from MonitorIds selected as primary 2018-09-21 13:40:48 -05: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 36fc5dde21 fix hidden floatbar consumes a lot of cpu 2018-09-18 21:46:02 +02: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
Martin Fleisz 3c158299a3
Merge pull request #4853 from r-barnett/add-nego-fail-exit-code
Add an exit code for a security protocol negotiation failure
2018-09-14 10:59:31 +02:00
Armin Novak 97c909107f Fixed const correctness for RAIL callbacks. 2018-09-14 10:07:22 +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 114abad767 Removed use of strcpy. 2018-08-27 14:34:09 +02:00
Armin Novak 48125164d7 Fixed dead initialization. 2018-08-24 13:40:36 +02:00
Martin Fleisz f9e52c1850
Merge pull request #4815 from akallabeth/async_transport_remove
Removed +async-transport options
2018-08-24 09:48:51 +02:00
Martin Fleisz ebef5a5e2e
Merge pull request #4811 from akallabeth/dyn_fullscreen_fix
Fixed single monitor fullscreen resolution update.
2018-08-23 16:58:22 +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
Ondrej Holy e7d5aae514 client/x11: Silence false positive warnings from covscan
Add code annotation to silence false positive warnings from covscan
due to omitting termination \0.

buffer_size: Calling strncpy with a source string whose length (13 chars) is greater than or equal to the size argument (13) will fail to null-terminate "&tmp[cs]".
2018-08-22 13:35:43 +02:00
Ondrej Holy baeb29a7e0 client/x11: Fix leak found by covscan
leaked_storage: Variable "actionScript" going out of scope leaks the storage it points to.
2018-08-22 13:35:43 +02:00
Ondrej Holy dde4c38382 client/x11: Format code by astyle
Run ./scripts/format_code.sh before the following changes.
2018-08-22 13:35:43 +02:00
Armin Novak 02dc6ab3f7 Fixed single monitor fullscreen resolution update. 2018-08-21 13:00:39 +02:00
Andreas Gröger 525d089fa8 Update X11-modifier key state on focus_in 2018-08-13 14:45:05 +02:00
Armin Novak a334aa9657 Fixed #4786: Added fullscreen handling for dynamic resolution. 2018-08-08 13:04:26 +02:00
akallabeth 88474af925
Merge pull request #4762 from mmattes/issue/4757
Fix for #4757
2018-07-30 13:31:32 +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
Markus Mattes bad8bbadf4 Fix for #4757 2018-07-22 20:00:25 +02:00
Armin Novak 328eba7fe9 Fix #4752: Provide message free function for channel queue. 2018-07-18 15:31:07 +02:00
Armin Novak 4e4ec0b035 Fix #4752: Unsubscirbe all PubSub in dynamic channel. 2018-07-18 14:29:22 +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
Martin Fleisz 187cf000bc
Merge pull request #4706 from khvMX/master
X11: fixed Right-Ctrl ungrab feature (PR #3622)
2018-07-03 12:45:15 +02:00
Armin Novak 273655a850 Follow up fix for #4631
Remember the callback state to avoid calling reerdp_channels_post_connect
before the corresponding client callback has benn called.
This might happen during redirection and reconnection.
2018-06-18 10:44:35 +02:00
Viktor Mukha 16cde2ee28 X11: fixed Right-Ctrl ungrab feature (PR #3622) 2018-06-08 11:35:02 +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 3a54713103 Fixed invalid argument parameter 2018-05-02 13:08:30 +02:00
Armin Novak a1c3c1ad64 Added proper return value checks for clipboard data. 2018-05-02 09:21:42 +02:00
Armin Novak 5628ed5e7d Check for window existence in remote app mode before access
X11 is asynchronous, so events arriving in xf_event_PropertyNotify
may access a window that has already been discarded. Check that before
reading properties.
2018-04-12 14:39:37 +02:00
Bernhard Miklautz c0afb8bd6b
Merge pull request #4322 from akallabeth/rail_fixes
Rail fixes for GFX mode
2018-04-11 10:49:44 +02:00
Armin Novak c70bf8329f Fixed XPixmap checks. 2018-04-04 10:46:14 +02:00
Armin Novak 065a924496 Fixed format string types. 2018-04-04 10:45:57 +02:00
akallabeth b37a98182d
Merge pull request #4457 from RangeeGmbH/fix_custom_sizes
Fix /size: /w: /h: with /monitors: (Fix custom sizes)
2018-04-04 10:35:47 +02:00
Armin Novak d249335708 Removed winpr_exit
As the cleanup functions are called by atexit a dedicated
cleanup call is no longer required.
2018-04-03 12:56:33 +02:00
Kai Harms 222bf9245e Fix /size: /w: /h: with /monitor: (Fix custom sizes)
Fix weird rectangle by removing checks
2018-03-29 07:12:53 +00:00
Ilya Shipitsin 14c15c680d resolve several possible null pointer dereference
issue detected by cppcheck

[channels/drive/client/drive_main.c:454] -> [channels/drive/client/drive_main.c:443]: (warning) Either the condition '!irp' is redundant or there is possible null pointer dereference: irp.
[client/X11/xf_window.c:582] -> [client/X11/xf_window.c:580]: (warning) Either the condition '!xfc' is redundant or there is possible null pointer dereference: xfc.
[winpr/libwinpr/path/test/TestPathShell.c:40] -> [winpr/libwinpr/path/test/TestPathShell.c:43]: (warning) Either the condition '!path' is redundant or there is possible null pointer dereference: path.
[winpr/libwinpr/path/test/TestPathShell.c:49] -> [winpr/libwinpr/path/test/TestPathShell.c:52]: (warning) Either the condition '!path' is redundant or there is possible null pointer dereference: path.
2018-03-24 17:46:39 +05:00
David Fort 103686eb12
Merge pull request #4497 from akallabeth/kwin_multimon
Fix #2707: Set fullscreen first
2018-03-19 19:12:02 +01:00
Armin Novak 338e74a6fb Fix #2707: Set fullscreen first
Due to kwin bug https://bugs.kde.org/show_bug.cgi?id=391960
multimonitor fullscreen is not applied correctly with the
previous approach.
2018-03-19 11:54:06 +01:00
Armin Novak 87ebdf0052 Fixed #4493: duplicate typedef. 2018-03-17 15:25:41 +01: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
Martin Fleisz 91ee4c2e9c
Merge pull request #4454 from akallabeth/nightly
Use a custom command to generate helper tool
2018-03-07 10:17:17 +01:00
Armin Novak 47110a723d Removed duplicate checks, more functions static. 2018-03-01 12:39:29 +01:00
Armin Novak 1f7d33a2f2 Fixed read/write of surface bits command.
The optional field exBitmapDataHeader of TS_ BITMAP_DATA_EX was ignored.
Read and expose the data (currently unused)
2018-03-01 11:38:59 +01:00
Armin Novak 62f06ed11e Use a custom command to generate helper tool
Removing elements from CMAKE_C_FLAGS is not reliable,
to use a custom command to compile the helper tool
with default CFLAGS for the system.
2018-02-21 13:14:45 +01:00
Armin Novak b2428767b2 manpage helper tool generation fixes
The generator tool is called by CMake and is incompatible
with certain options. Therefore this commit
* removes WinPR dependency
* removes -fsanitize=* from CFLAGS
2018-02-16 13:57:34 +01:00
Martin Fleisz 5d1ff02d02
Merge pull request #4414 from akallabeth/pthread_cleanup_fix
Pthread cleanup fix
2018-02-15 11:02:37 +01:00
Armin Novak 990b8c23a9 Fixed PubSub function pointer casts. 2018-02-14 11:00:52 +01:00
David Fort 441975a4aa video, geometry: fix prototypes for timer callbacks 2018-02-14 10:16:38 +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
Armin Novak 3eb004042e Fixed code duplication. 2018-02-13 10:52:53 +01:00
Armin Novak c7d701bdf8 Added software decoding fallback for RDPVOR 2018-02-13 10:52:53 +01:00
Armin Novak 11f11a8763 Fixed scaled drawing of video content. 2018-02-13 10:52:53 +01:00
David Fort b8e3b232de video: mutualize things in the common channel code 2018-02-13 10:52:53 +01:00
David Fort 0743559d9c video: do cleanups in post_connect 2018-02-13 10:51:45 +01:00
David Fort ca4f75ccd3 video: fixed uninit of channel 2018-02-13 10:51:45 +01:00
David Fort 4b240dad0e video+geometry: fixed leaks, a segfault and concurrent accesses 2018-02-13 10:51:07 +01:00
David Fort 6e022ae07c video: fix prototype and cleanup at exit 2018-02-13 10:51:07 +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 2cf10cc359 bitmap free now always deallocating all resources. 2018-02-13 10:18:43 +01:00
Armin Novak 62607e3b02 Fixed accidental free of XImage data. 2018-02-12 12:44:51 +01:00
Armin Novak 2d58e96dcc Exit main thread with winpr_exit to trigger resource cleanup.
When using pthread_once with destructors they are only called,
if each thread (including the main thread) is exited with pthread_exit.
Introducing winpr_exit as a wrapper for that purpose.
2018-02-12 10:33:02 +01:00
Armin Novak 7c0a33632b Fixed #4412: XImage must be freed with XDestroyImage 2018-02-12 10:02:35 +01:00
Armin Novak 1b9da01612 Fixed cleanup of xfc->drawable. 2018-02-09 11:42:18 +01:00
Armin Novak d181c79463 Fixed rail window cleanup. 2018-02-09 09:35:26 +01:00
Armin Novak 6950d95af0 Fix #4398: Ignore min/max info for non existing window. 2018-02-08 16:55:11 +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 253beda330 Fixed formatting. 2018-02-08 11:55:57 +01:00
Armin Novak 17b17d609a Fixed SuppressOutput update. 2018-02-08 11:55:15 +01:00
Bernhard Miklautz db2d1ffcce cmdline refactor: move cmd struct to extra file
Move the cmd struct to a extra header file. This allows it to only
include the header file in generate_argument_docbook.c and therefore
remove a linker dependencies.
2018-02-01 17:13:44 +01:00
Armin Novak 7f75b57fd6 Fixed memory leak. 2018-01-22 16:17:37 +01:00
Armin Novak 51e59e1f2e Check argument, xfc->window is NULL in RAILS mode 2018-01-08 13:21:03 +01:00
Armin Novak e23af1d2fc Fixed missing argument checks. 2018-01-08 13:21:02 +01:00
Armin Novak ac1d6e8153 Fixed #3676, #4269: Screen update for RAIL with GFX 2018-01-08 13:21:02 +01:00
David Fort e1cc601963
Merge pull request #4323 from akallabeth/scanbuild_fixes
Scanbuild and other warnings fixed
2018-01-08 11:16:21 +01:00
akallabeth 4077d55a6c
Merge pull request #4332 from hardening/xrandr_and_fixes
Xrandr and fixes
2018-01-08 09:20:56 +01:00
David Fort 191b8f950f Fix for #4330
Since ec027bf dynamic resolution is broken when used with egfx. Before that commit
we were tracking a server sent resize by setting a DesktopResize callback. This callback
is called when the desktop is resized by the server. Anyway the problem was that when this
callback is called, the activation sequence is not always completed, which were leading to
some freeze with 2012r2 servers (sending packets before the sequence is finished).
So with the faulty commit, we are tracking server resizes by subscribing to the Actived
event, that is called at the end of a reactivation sequence, so we're sure to not send packets
when not fully activated.
Anyway the issue that shows on (#4330) is that when you use egfx, no reactivation sequence happens,
the server only sends a ResetGraphics message with the new size, and so we miss the resized event.
This fix introduces a new GraphicsReset event, makes the display channel subscribe to that event,
and react accordingly.
2017-12-23 13:50:54 +01:00
David Fort 58b5573c82 Use more xrandr attributes when available and preserve [desktop|device]ScaleFactor
Fix a too restrictive detection of XRandr support.
Set more monitor's attributes like physical size and orientation when XRandr is
available.
Set [desktop|device]ScaleFactor when it has been given on the command line, this
should fix #4324.
2017-12-23 13:46:42 +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 9c93c6cbf3 Fixed unused variable warnings. 2017-12-21 11:04:50 +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
David Fort 11ee81be60 Fix XRandr for old systems and MacOSX
We need a recent enough version of XRandr to correctly detect monitor.
Also this patch adds some typo or style fixes.
2017-12-08 10:59:38 +01:00
David Fort e064aa6a99 xfreerdp: when available use xrandr to get display infos 2017-11-29 10:38:48 +01:00
Armin Novak d81e2ec351 Fixed X11 stride on screen update. 2017-11-21 11:09:16 +01:00
Armin Novak 24233b299c Fix #4111: 15bpp color handling for brush. 2017-11-20 15:00:09 +01:00
Martin Fleisz 4ff1251488
Merge pull request #4236 from akallabeth/scan_fix_remastered
Scanbuild warning fixes
2017-11-17 13:02:46 +01:00
David Fort 6666564493
Merge pull request #4186 from RangeeGmbH/multimonitor_primary_fix
FreeRDP multimonitor: Use first command line element, then primary, …
2017-11-16 15:26:03 +01:00
Armin Novak 5ffde16883 Fixed NULL arguments and compile warnings. 2017-11-15 15:54:38 +01:00
David Fort 960b992f76
Merge pull request #4151 from ondrejholy/manpages-update-master
Manpage and /help update
2017-11-09 15:24:27 +01:00
Kai Harms e2c651bce4 FreeRDP multimonitor: Use first command line element, then primary, then fallback to 0,0 2017-11-07 10:11:29 +00:00
Armin Novak ce00f4dd8f Silence WLog_ERR messages if last error is set. 2017-11-06 14:02:22 +01:00
akallabeth e7b8833e9e
Merge pull request #4187 from hardening/multimon_fix
Multimonitor fix
2017-11-06 10:02:07 +01:00
Armin Novak afb08c9dfb X11 window title fix 2017-10-31 18:00:15 +01:00
Roman Kalashnikov 40d84d4be1
Fixed twice assigned values 2017-10-31 00:11:25 +03:00
David Fort 46c7097a86 multimon: flag the primary monitor according to the /monitors option
The first monitor of the list is considered like the primary monitor.
2017-10-17 14:31:11 +02:00
Ondrej Holy 362593629a client/X11: Mention also aliases in man page
Aliases are not currently mentioned in man page. Let's mention them.
2017-09-27 11:20:25 +02:00
Ondrej Holy 7538c86ce3 client/X11: Improve man page generation
This patch contains several improvements:
- add missing colons before format strings
- always print format string after argument
- do not duplicate format string before description
- use <replaceable> only for variables in format string
- use +/- for boolean arguments
- print also default value for all kinds of arguments
2017-09-27 11:20:25 +02:00
Ondrej Holy a49c856d78 client/X11: Remove const qualifier
Const keyword is used for some alloced strings and cast is used to
free it currently. Let's remove the unwanted const qualifier.
2017-09-27 11:20:25 +02:00
David Fort 9ac54ede6d Fix displaying of raw surfaces 2017-09-26 13:56:08 +02:00
Bernhard Miklautz 4592deee72 extend /size to allow width or height percentages (#4146)
If the size parameter is used with a percentages like /size:50% now
an additional 'w' or 'h' can be appended (like /size:50%w) to specify
where the percentage should be applied. If both or none are set the
behavior is like it was before and the percentage is applied to width
and height.
2017-09-25 09:35:49 +02:00
Bernhard Miklautz aa9ff84978 Merge pull request #4116 from ChickenPeanut/patch-1
Fixed BadValue with XCreateWindow
2017-09-21 14:50:34 +02: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
Ondrej Holy 4239660e34 client/X11: Check arguments in xf_Bitmap_SetSurface
Arguments of xf_Bitmap_SetSurface are not checked before use currently
which may lead to segfaults. It may happen if bitmap is not found in a
cache from some reason. Let's check the arguments before use similarly
as it is done in client/Windows/wf_graphics.c in order to avoid segfaults.

https://github.com/FreeRDP/FreeRDP/issues/4117
2017-09-07 09:38:44 +02:00
ChickenPeanut 0efb07bc66 Fixed BadValue with XCreateWindow
xf_FixWindowCoordinates occasionally set the dimensions of the window to invalid values (0) because the minimum value check was done at the beginning of the method rather than at the end
2017-09-03 18:52:34 -04:00
abma 165de91287 Revert "Possible fix for #4081 and #2707 (#4087)"
This reverts most of commit 6b7b602370.

Part of #4096
2017-08-22 22:45:38 +02:00
Jiang, Zihao 790c48017c Client/X11: Fix h264 context leak when DeleteSurface (#4089) 2017-08-14 10:16:14 +02:00
Kai 6b7b602370 Possible fix for #4081 and #2707 (#4087)
* detect openbox automatically

* format code

* copyright update

* free prop at the end of the function
2017-08-14 10:10:53 +02:00
Armin Novak dd4b5ea126 Disable JPEG codec support if not compiled in. 2017-07-24 15:23:36 +02:00
Armin Novak b51a103b70 Fixed uninitialized values. 2017-07-20 09:35:41 +02:00
Armin Novak 8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Armin Novak 0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
Norbert Federa 36b8f54c5e Fixed a few compiler warnings 2017-07-10 17:52:05 +02:00