Commit Graph

188 Commits

Author SHA1 Message Date
Armin Novak
0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
liuchenghao
8e87e9d6eb Fix that when the window is minimized, click the dock to restore the window, it cannot be restored normally 2021-07-20 12:23:43 +02:00
Armin Novak
390e329807 client: Fixed warnings 2021-06-18 11:32:16 +02:00
Armin Novak
ccfe0c129e Removed checks already done by WINPR_ASSERT 2021-06-16 11:46:42 +02:00
Armin Novak
d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak
a1c8e4cf85 Refactored ArrayList_Add to conform to other functions 2021-06-16 11:46:42 +02:00
akallabeth
618227d751 Fix xf_Pointer_SetPosition with smart-sizing 2021-03-08 14:25:59 +01:00
Armin Novak
b1ff171413 Fixed #6014: XFCE minimized state 2021-02-25 14:17:39 +01:00
Malte Starostik
06219e4ecb X11 client: ignore grab related LeaveNotify events
This fixes click and drag or more generally any press-hold-release combinations
for the primary mouse button.
Without this, click and drag, drag and drop and in, some remote applications
that presumably rely on the full press-release sequence, even button
presses don't always work.
2021-02-23 14:05:11 +01:00
Armin Novak
555e1ad8f2 Properly discard xfc->appWindow on focus loss 2021-01-11 15:18:30 +01:00
akallabeth
dfbf300389 Conservative keyboard state sync, refactored input API 2020-11-10 10:26:41 +01:00
akallabeth
6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
Armin Novak
e241044f1f Fixed #6221: Update floatbar position with multitouch input 2020-05-25 08:43:03 +02:00
akallabeth
7890833af8 Replaced strtok with strtok_s 2020-05-18 11:39:22 +02:00
Armin Novak
032574cc8f X11 XEvent handling use const arguments 2020-03-04 10:38:41 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
2cc714a57d Updated RAILS implementation
* Implement new messages and callbacks
* Announce most recent channel features
* Added settings to configure flags to announce
2019-05-08 17:25:15 +02:00
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