kwin/autotests/integration
Martin Gräßlin 0bb587dcb9 Ensure PointerInputRedirection::processMotion finishes prior to warping
Summary:
Consider the following situation: we have three InputEventFilter linked
in the sequence A - B - C.

The input filters are processing pointer motion events. The expected
behavior is that the new motion is processed in the sequence
   A -> B -> C

So far this did not work correctly if the pointer gets warped during the
processing. If e.g. filter B warps the pointer we get a motion sequence:
   A (1) -> B (1) -> A (2) -> B (2) -> C (2) -> C (1)

The filters following the one warping the pointer get first the newer
than the older position. This is obviously wrong. Unfortunately it is not
just a theoretical condition, but a condition happening when interacting
with the screenedges, which warp the pointer.

This change introduces a PositionUpdateBlocker in
PointerInputRedirection::processMotion to ensure that a processMotion
call finishes prior to the next update. If the PositionUpdateBlocker is
blocked the new position gets scheduled and processed once the
PositionUpdateBlocker gets destroyed.

With this we get the expected sequence for B warping pointer:
   A (1) -> B (1) -> C (1) -> A (2) -> B (2) -> C (2)

This should hopefully improve the interaction with screen edges on
Wayland.

CCBUG: 374867

Test Plan:
Added an auto test demonstrating the issue of incorrect
ordering caused by screenedges. Prior to the change the test is failing.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5182
2017-03-27 07:08:10 +02:00
..
data
effects
helper
scripting
activities_test.cpp
CMakeLists.txt
debug_console_test.cpp
decoration_input_test.cpp
desktop_window_x11_test.cpp
dont_crash_aurorae_destroy_deco.cpp
dont_crash_cancel_animation.cpp
dont_crash_empty_deco.cpp
dont_crash_glxgears.cpp
dont_crash_no_border.cpp
globalshortcuts_test.cpp
input_stacking_order.cpp
internal_window.cpp
keyboard_layout_test.cpp
kwin_wayland_test.cpp
kwin_wayland_test.h
lockscreen.cpp
maximize_test.cpp
modifier_only_shortcut_test.cpp
move_resize_window_test.cpp
no_xdg_runtime_dir_test.cpp
plasma_surface_test.cpp
plasmawindow_test.cpp
platformcursor.cpp
pointer_constraints_test.cpp
pointer_input.cpp Ensure PointerInputRedirection::processMotion finishes prior to warping 2017-03-27 07:08:10 +02:00
quick_tiling_test.cpp
scene_opengl_test.cpp
scene_qpainter_test.cpp
screen_changes_test.cpp
screenedge_client_show_test.cpp
shade_test.cpp
shell_client_test.cpp
start_test.cpp
struts_test.cpp
tabbox_test.cpp
test_helpers.cpp
touch_input_test.cpp
transient_no_input_test.cpp
transient_placement.cpp
window_rules_test.cpp
window_selection_test.cpp
x11_client_test.cpp
xclipboardsync_test.cpp
xwayland_input_test.cpp