kwin/autotests/integration
Vlad Zagorodniy 5e104fbc12 [scripting] Introduce redirect function
Summary:
Consider current implementation of the Squash effect: if a window was
minimized, an animation will be started; if the window is unminimized
and the animation is still active (that can happen when user clicks on
app's icon really fast), the animation will be stopped and a new one will
be created. Such behavior can lead to rapid jumps in the observed
"animation".

A better approach would be first try to **reverse** the already active
animation, and if that attempt wasn't successful, start a new animation.

This patch introduces a new function to the scripted effects API that
lets JavaScript effects to control direction of animations. The
prototype of the function looks as follows:

    redirect(<animation id(s)>, <direction>, [<termination policy>])

the first argument is an animation id or a list of animation ids, the
second argument specifies the new direction of the animation or
animations if a list of ids was passed as the first argument. The
third argument specifies whether the animation(s) should be terminated
when it(they) reaches the source position, currently it's relevant only
for animations that are created with set() function. The termination
policy argument is optional, by default it's Effect.TerminateAtSource.

We can use this function to fix issues with rapid jumps in the Squash
effect. Also, redirect() lets us to write effects for simple animations
in slightly different style: first, we have to start the main animation
(e.g. for the Dialog Parent effect, it would be dimming of main windows)
and then change direction of the animation depending on external events,
e.g. when the Desktop Cube effect is activated.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, abetts, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16449
2018-11-17 13:44:16 +02:00
..
data Add support for desktopFileName provided by NETWinInfo 2016-10-31 13:19:46 +01:00
effects [scripting] Introduce redirect function 2018-11-17 13:44:16 +02:00
fakes [scenes/opengl] Fix overlapping shadow tiles 2018-06-07 12:07:57 +03:00
helper XdgV6 - Kwin side 2017-09-25 16:47:30 +01:00
scripting Fix minor EBN issues 2018-08-29 21:02:16 +03:00
activities_test.cpp Fix the way how we quit kactivitymanagerd from the unit test 2018-11-09 17:27:07 +01:00
CMakeLists.txt Generalize constrainedStackingOrder for group transients and ordinary transients 2018-10-15 15:46:03 +03:00
colorcorrect_nightcolor_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
debug_console_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
decoration_input_test.cpp [platforms/virtual] Let VirtualOutput inherit Output 2018-08-31 11:56:39 +02:00
desktop_window_x11_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
dont_crash_aurorae_destroy_deco.cpp Copy plastik window decoration to build directory 2018-11-08 08:31:17 +01:00
dont_crash_cancel_animation.cpp [autotests/integration] Use socketpair for Wayland connection 2016-12-15 21:31:27 +01:00
dont_crash_cursor_physical_size_empty.cpp Don't crash if the cursor theme fails to create 2018-03-04 09:42:27 +01:00
dont_crash_empty_deco.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
dont_crash_glxgears.cpp Handle situation of no XDG_RUNTIME_DIR gracefully 2016-07-13 10:00:46 +02:00
dont_crash_no_border.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
dont_crash_useractions_menu.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
generic_scene_opengl_test.cpp [autotests] Drop cast to SceneOpenGL GenericSceneOpenGLTest 2017-09-08 16:06:33 +02:00
generic_scene_opengl_test.h [autotests] Test creating core context profile 2017-06-25 09:48:46 +02:00
globalshortcuts_test.cpp Don't try to filter null key combinations 2018-04-24 16:35:23 +02:00
idle_inhibition_test.cpp Add support for new IdleInhibition protocol 2017-11-30 21:51:36 +01:00
input_stacking_order.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
internal_window.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
keyboard_layout_test.cpp Fix KeyboardLayoutTest::testNumLock 2018-11-15 19:01:51 +01:00
keymap_creation_failure_test.cpp Better handle cases when the xkb keymap fails to be created 2017-06-18 21:04:58 +02:00
kwin_wayland_test.cpp Unset XKB_DEFAULT_* in tests to make tests better reproducable 2018-11-07 20:10:58 +01:00
kwin_wayland_test.h [wayland] XdgPopup Positioning 2018-10-20 17:17:59 +01:00
kwinbindings_test.cpp [autotests] Try making KWinBindingsTest::testSwitchWindowScript more robust 2017-08-13 17:08:49 +02:00
lockscreen.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
maximize_test.cpp [wayland] Fix maximised test 2018-11-16 12:28:38 +00:00
modifier_only_shortcut_test.cpp [autotests] Force XKB_DEFAULT_RULES to evdev in ModifierOnlyShortcutsTest 2017-09-17 20:54:32 +02:00
move_resize_window_test.cpp Clean up includes 2018-08-31 22:58:11 +03:00
no_xdg_runtime_dir_test.cpp Handle situation of no XDG_RUNTIME_DIR gracefully 2016-07-13 10:00:46 +02:00
plasma_surface_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
plasmawindow_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
platformcursor.cpp Handle situation of no XDG_RUNTIME_DIR gracefully 2016-07-13 10:00:46 +02:00
pointer_constraints_test.cpp Disable modifier window actions if global shortcuts are disabled 2018-10-14 09:45:57 +02:00
pointer_input.cpp Disable modifier window actions if global shortcuts are disabled 2018-10-14 09:45:57 +02:00
quick_tiling_test.cpp [autotests] Handle async maximisation in quick tiling test 2018-11-08 01:50:51 +00:00
scene_opengl_es_test.cpp [autotests] Introduce a SceneOpenGL ES test 2017-06-24 21:05:49 +02:00
scene_opengl_shadow_test.cpp [scenes/opengl] Fix overlaps in shadow texture atlas 2018-08-31 17:33:19 +03:00
scene_opengl_test.cpp [autotests] Introduce a SceneOpenGL ES test 2017-06-24 21:05:49 +02:00
scene_qpainter_shadow_test.cpp compare doubles to doubles 2018-06-14 09:21:07 +01:00
scene_qpainter_test.cpp Do not unset cursor image when cursor enters a surface 2018-05-19 08:58:42 +02:00
screen_changes_test.cpp Add XDG Output support 2018-05-18 14:16:13 +01:00
screenedge_client_show_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
shade_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
shell_client_rules_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
shell_client_test.cpp [wayland] Fix ShellClientTest 2018-11-16 11:59:39 +00:00
showing_desktop_test.cpp Restore active client after ending showing desktop 2017-07-01 08:20:01 +02:00
stacking_order_test.cpp Keep Deleted transients above old parents 2018-10-16 18:58:17 +03:00
start_test.cpp [autotests] Try making StartTest more robust on FreeBSD 2017-09-23 15:17:19 +02:00
struts_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
tabbox_test.cpp [autotests/integration] Use socketpair for Wayland connection 2016-12-15 21:31:27 +01:00
test_helpers.cpp [wayland] XdgPopup Positioning 2018-10-20 17:17:59 +01:00
touch_input_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
transient_no_input_test.cpp [wayland] XdgPopup Positioning 2018-10-20 17:17:59 +01:00
transient_placement.cpp [wayland] XdgPopup Positioning 2018-10-20 17:17:59 +01:00
virtual_desktop_test.cpp [wayland] add enter/leave virtual desktop API 2018-11-14 11:08:46 +00:00
window_rules_test.cpp Re-evaluate the window rules when the window class of a Client changes 2018-11-07 09:33:39 +01:00
window_selection_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00
x11_client_test.cpp Clean up includes 2018-08-31 22:58:11 +03:00
xclipboardsync_test.cpp Temporarily skip XClipboardSyncTest 2018-11-15 14:31:38 +01:00
xwayland_input_test.cpp [platforms/virtual] Add virtual output class 2018-03-19 22:12:22 +01:00