Commit Graph

18 Commits

Author SHA1 Message Date
Ondrej Holy
ac114d45c7 wlfreerdp: Fix array overrun
This fixes the following defects reported by covscan tool:
 - client/Wayland/wlf_input.c:251: overrun-local: Overrunning array "contacts" of 10 32-byte elements at element index 10 (byte offset 351) using index "i" (which evaluates to 10).
 - client/Wayland/wlf_input.c:308: overrun-local: Overrunning array "contacts" of 10 32-byte elements at element index 10 (byte offset 351) using index "i" (which evaluates to 10).
 - client/Wayland/wlf_input.c:360: overrun-local: Overrunning array "contacts" of 10 32-byte elements at element index 10 (byte offset 351) using index "i" (which evaluates to 10).
 - client/Wayland/wlf_input.c:251: error[arrayIndexOutOfBounds]: Array 'contacts[10]' accessed at index 10, which is out of bounds.
 - client/Wayland/wlf_input.c:308: error[arrayIndexOutOfBounds]: Array 'contacts[10]' accessed at index 10, which is out of bounds.
 - client/Wayland/wlf_input.c:360: error[arrayIndexOutOfBounds]: Array 'contacts[10]' accessed at index 10, which is out of bounds.
 - client/Wayland/wlf_input.c:246: uninit_use_in_call: Using uninitialized value "y" when calling "wlf_scale_coordinates".
 - client/Wayland/wlf_input.c:246: uninit_use_in_call: Using uninitialized value "x" when calling "wlf_scale_coordinates".

The maximal number of touches can be higher then 10, see:
https://wayland.freedesktop.org/libinput/doc/latest/touchpads.html

Let's increse the MAX_CONTACTS count and add checks to prevent usage of
uninitialized values.
2020-06-04 07:55:12 +02:00
akallabeth
77b38d9375 Fixed #6087: Inconsistend scroll on wayland
Thanks to @yol and @SaschaWessel a bug in scroll step conversion
was uncovered. The RDP value ranges are inverted when scrolling
in negative direction.
2020-05-04 08:57:56 +02:00
akallabeth
9ef1e81c55 Formatted patch. 2020-03-27 14:16:18 +01:00
Julian Albrecht
7ecce5acbe Adds touch support to wlfreerdp 2020-03-27 14:16:18 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
0a95e4aa78 Fixed #5262: Vertical mouse wheel direction and whell step
* Vertical wheel uses the inverted direction of horizontal wheel.
* The wheel step is now calculated from the value provided by wayland.
2019-02-20 08:56:36 +01:00
Armin Novak
7413370783 Added mouse pointer scaling. 2019-02-08 12:08:30 +01:00
Armin Novak
8d6a6df48a Implements #5215: Smart sizing using libcairo 2019-02-08 12:08:30 +01:00
Armin Novak
b2ef3e69ca Fixed Wayland horizontal mouse wheel direction. 2019-01-07 10:02:04 +01:00
Armin Novak
1984f73db8 Implemented horizontal mouse wheel for wayland. 2018-12-18 13:49:13 +01:00
Armin Novak
f647e5cc3f Implemented mouse buttons 4 and 5 for wayland. 2018-12-18 13:49:08 +01:00
Armin Novak
733f58c4f9 Use wrapper functions for input event handling. 2018-03-05 09:59:41 +01:00
Armin Novak
84f2cff5e0 Fixed wayland issues. 2018-02-15 09:44:38 +01:00
Olivier Blin
3e5f8c6bdb Reuse evdev/X11 keymap for wayland 2017-07-05 18:48:24 +02:00
David FORT
ded17d9d0c Move wayland client to UWAC 2016-02-23 14:09:53 +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
Manuel Bachmann
a9cf8b5838 wlfreerdp: add keyboard and mouse wheel support, fix bugs
This commit does the following:

* fix the keyboard logic (which now fully works), add support for vertical mouse wheel events ;
* make the rendering a lot more efficient, by using RDP damage information to refresh only the relevant part of the buffer ;
* fix two race conditions. wlfreerdp should not crash anymore now ;
* fix shm_open() and shm_unlink() calls ;
* improve the code style.

Signed-off-by: Manuel Bachmann <tarnyko@tarnyko.net>
2014-11-26 10:46:05 +01:00
Manuel Bachmann
93ff550ae0 wlfreerdp: reorganize source files, add input methods
We split the one massive source file into multiple separate
source files and headers, just like it is done for other
clients.

We add a new "wlfInput" interface which will try to
initialize mouse and keyboard at startup. Mouse inputs
already work, keyboard inputs need further investigation.

Signed-off-by: Manuel Bachmann <tarnyko@tarnyko.net>
2014-11-17 16:42:27 +01:00