Commit Graph

171 Commits

Author SHA1 Message Date
Armin Novak
05901280fe Fixed unused argument warnings. 2019-04-05 09:14:35 +02:00
Armin Novak
e009a62f06 Fixed sign-compare warnings 2019-04-05 09:14:35 +02:00
Armin Novak
81d7e62642 Fixed broken checks in X11 event (RAIL mode) 2019-02-08 10:46:26 +01:00
Armin Novak
2dab778101 Fixed NULL dereferences and uninitialized values 2019-01-30 16:11:10 +01:00
Bernhard Miklautz
6f6c8473a1
Merge pull request #5126 from akallabeth/x11_button_mapping
X11 extended button remapping support.
2018-12-11 08:53:39 +00:00
Armin Novak
0fa9f06565 Modified flag checks to avoid invalid flag sets. 2018-12-11 09:34:07 +01:00
Armin Novak
2ce04069cb Fixed crashes in rail mode after merge of floatbar fixes. 2018-12-10 15:41:20 +01:00
Armin Novak
7102927548 X11 extended button remapping support.
Up until now X11 mouse button remapping was only possible for the
default buttons 1 to 3.
With this pull any X11 mouse button can be mapped to any RDP mouse
event and all X11 remappings are respected.
2018-12-10 15:03:29 +01:00
Armin Novak
56156d217e Floatbar self contained. 2018-12-07 15:22:28 +01:00
Hualet Wang
e33efccf48 Fixed RAIL window can't show again once hidden
The cause is very simple: we didn't map the xwindow on receiving
WINDOW_SHOW. but doing that causes another problem that you can't
hide a window anymore, and that is because whlie window hiding, the
_NET_WM_STATE and WM_STATE properies of the xwindow may change, in
the function `xf_event_PropertyNotify` we just assume that windows
not maximized, not minimized, yet not showing normally should be
corrected to be shown, we just need to consider the situation that
the window is hidden here.

fix: #5078
2018-12-04 20:37:37 +08: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
akallabeth
0b8a66188c
Merge pull request #4865 from mmattes/feature/floatbar
Feature/floatbar for X11
2018-09-25 16:34:20 +02:00
Armin Novak
51f97f2d3e Fixed #3423: Process xevents when in reconnect mode.
Fixed crashes due to unloaded disp channel in reconnect mode.
2018-09-24 16:24:32 +02:00
Markus Mattes
21e4804a7f implemented floatbar for x11 2018-09-18 21:25:51 +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
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
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
17b17d609a Fixed SuppressOutput update. 2018-02-08 11:55:15 +01:00
Armin Novak
9c93c6cbf3 Fixed unused variable warnings. 2017-12-21 11:04:50 +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
John Mullen
de1868b6ab Fix issue #3229 Barcode Scanner USB - missing double characters
With some usb barcode scanners, repeated characters do not appear in the freerdp session.
It looks like this is because the KeyRelease signal is not sent for the first character.
Removing this if check fixes the problem.
2017-06-05 17:06:07 -04:00
ilammy
82f3abac49 client/X11: teach RAIL to use clipboard redirection
XSelection protocol does not define any global clipboard as there is on
Windows. Instead each window has its own property for clipboard content
(like CLIPBOARD or PRIMARY) and there is a global notion of clipboard
ownership.  Only one window can claim ownership of some clipboard type
at the moment.

FreeRDP uses CLIPBOARD for clipboard transfers (it's the one used by
applications when Ctrl+V is pressed). For regular desktop sessions the
session window itself is used for clipboard interactions via
xfc->drawable field. However, for remote app session there is no session
window. We cannot use the current remote app window as it may change or
be destroyed without closing the session. We also cannot use the root
window as it is already used for CF_RAW transfer protocol.

Therefore we create a simple dummy window to put into xfc->drawable for
this exact job: to act as a clipboard vessel on behalf of the entire
remote app session.

xf_create_window() usually creates the window as we immediately start in
RAIL mode when possible. xf_rail_enable_remoteapp_mode() is invoked only
when autologin failed or remote desktop had to show the session window
to the user for some reason.
2017-05-01 02:10:55 +03:00
Armin Novak
b2c29158be Scanbuild warning, argument checks and leak fixes.
* Added Stream_GetRemainingCapacity to check remaining stream size
  before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
Volth
e7487cea27 Add command line option to override action script path 2017-02-08 08:30:24 +00:00
akallabeth
9e636f2d71 Merge pull request #3622 from khvMX/master
Ungrab keyboard feature for X11
2017-01-11 16:31:15 +01:00
Viktor Mukha
d129102e4c X11 ungrab keyboard only if RightCtrl is released right away 2016-12-20 10:59:45 +01:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Armin Novak
a0fed88574 Check hwheel capability before sending mouse event. 2016-11-24 13:19:46 +01:00
Armin Novak
943e295714 WLog using C99 compatible variadic macros. 2016-10-07 14:05:27 +02:00
Armin Novak
c8a7065f93 Refactored xfContext. 2016-10-06 13:43:06 +02:00
Armin Novak
85bbe2a908 API refactoring. 2016-10-06 13:43:03 +02:00
Roland Kaufmann
6ca8962045 Map logical to physical mouse button events
RDP expects to receive an indicator of the physical mouse button that
was pressed on the client, whereas X11 deliver a value for which
logical mouse button that was pressed.

This patch introduces a (reverse) mapping from logical mouse buttons to
physical mouse buttons, so that the RDP server can do correct mapping
for the event on its end.

However, no actual mapping is done here; this patch just introduces the
framework to do so. Thus, there should be no behavioural change from
this patch alone.

There is an implicit assumption that only the first three buttons are
mapped to eachother. Enabling more a general mapping would require
extensive changes to the event handling as fourth logical button and
up is used for special functionality such as wheel.
2015-12-15 17:42:05 +01:00
Binyamin Sagal
23fea1615f Fix horizontal scrolling direction and capability detection 2015-12-14 21:48:31 +02:00
Armin Novak
a5db7117c8 Implemented horizontal wheel support.
Horizontal mouse wheel input capabilities are now checked
and if available mouse buttons 6 and 7 are mapped to the
horizontal wheel for the X11 client.
2015-12-14 18:29:23 +01:00
Binyamin Sagal
d81784cec6 remove horizontal scroll maping to forward/back
partal fix for #2302
2015-12-14 18:01:04 +01: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
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
David FORT
29d372480a Take in account nfedera's review 2015-05-20 19:19:50 +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
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
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
Seray Rosh
ffa7f0363f release keys when xfreerdp is unfocused to prevent stuck keys 2015-02-27 16:02:40 +01: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
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
6857a4f2b7 xfreerdp: remove old X11 RAIL code 2014-11-12 17:18:27 -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
1225c6b5ce xfreerdp: separate app windows from desktop windows 2014-11-11 22:27:33 -05:00