diff options
author | Cosmic Chip Socket <34800072+cosmicchipsocket@users.noreply.github.com> | 2018-08-17 18:59:26 -0400 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-14 23:51:20 +0100 |
commit | cf124b1415c4718325514ec32794fb0587885e3b (patch) | |
tree | 871970d65029ba383f5a9d3b66054a748ab6a11f /editor/icons/icon_loop_interpolation.svg | |
parent | 5f32fc82087404ac2c803770dc9d1e3711fc14fd (diff) |
Use XInput2 RawMotion to generate MouseMotion events
The current system for capturing the mouse and generating motion events on X11
has issues with inaccurate and lopsided input. This is because both
XQueryPointer and XWarpPointer work in terms of integer coordinates when the
underlying X11 input driver may be tracking the mouse using subpixel
coordinates. When warping the pointer, the fractional part of the pointer
position is discarded.
To work around this issue, the fix uses raw motion events from XInput 2. These
events report relative motion and are not affected by pointer warping.
Additionally, this means Godot is able to detect motion at a higher resolution
under X11. Because this is raw mouse input, it is not affected by the user's
pointer speed and acceleration settings. This is the same system as SDL2 uses
for its relative motion.
Multitouch input on X requires XInput 2.2. Raw motion events require
XInput 2.0. Since 2.0 is old enough, this is now the minimum requirement to
use Godot on X.
Diffstat (limited to 'editor/icons/icon_loop_interpolation.svg')
0 files changed, 0 insertions, 0 deletions