kwin/autotests/integration
Vlad Zahorodnii 9a7ab8a62e Rework async geometry updates
Window management features were written with synchronous geometry
updates in mind. Currently, this poses a big problem on Wayland because
geometry updates are done in asynchronous fashion there.

At the moment, geometry is updated in a so called pseudo-asynchronous
fashion, meaning that the frame geometry will be reset to the old value
once geometry updates are unblocked. The main drawback of this approach
is that it is too error prone, the data flow is hard to comprehend, etc.

It is worth noting that there is already a machinery to perform async
geometry which is used during interactive move/resize operations.

This change extends the move/resize geometry usage beyond interactive
move/resize to make asynchronous geometry updates less error prone and
easier to comprehend.

With the proposed solution, all geometry updates must be done on the
move/resize geometry first. After that, the new geometry is passed on to
the Client-specific implementation of moveResizeInternal().

To be more specific, the frameGeometry() returns the current frame
geometry, it is primarily useful only to the scene. If you want to move
or resize a window, you need to use moveResizeGeometry() because it
corresponds to the last requested frame geometry.

It is worth noting that the moveResizeGeometry() returns the desired
bounding geometry. The client may commit the xdg_toplevel surface with a
slightly smaller window geometry, for example to enforce a specific
aspect ratio. The client is not allowed to resize beyond the size as
indicated in moveResizeGeometry().

The data flow is very simple: moveResize() updates the move/resize
geometry and calls the client-specific implementation of the
moveResizeInternal() method. Based on whether a configure event is
needed, moveResizeInternal() will update the frameGeometry() either
immediately or after the client commits a new buffer.

Unfortunately, both the compositor and xdg-shell clients try to update
the window geometry. It means that it's possible to have conflicts
between the two. With this change, the compositor's move resize geometry
will be synced only if there are no pending configure events, meaning
that the user doesn't try to resize the window.
2021-05-25 06:17:41 +00:00
..
data Prettify license headers 2020-08-07 19:57:56 +00:00
effects Prepend "Interactive" to interactive move resize methods 2021-05-16 13:50:25 +03:00
fakes Use versionless Qt cmake target 2021-01-30 17:18:21 +01:00
helper Use versionless Qt cmake target 2021-01-30 17:18:21 +01:00
protocols Implement the layer-shell v1 protocol 2020-09-03 18:11:44 +00:00
scripting autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
activation_test.cpp autotests: Stabilize ActivationTest::testSwitchToWindowMaximized 2021-05-12 20:44:28 +03:00
activities_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
buffer_size_change_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
CMakeLists.txt autotests: Introduce own idle inhibit v1 helpers 2021-05-14 05:36:08 +00:00
dbus_interface_test.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
debug_console_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
decoration_input_test.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
desktop_window_x11_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
dont_crash_aurorae_destroy_deco.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
dont_crash_cancel_animation.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
dont_crash_cursor_physical_size_empty.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
dont_crash_empty_deco.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
dont_crash_glxgears.cpp Avoid converting socket name between QString and QByteArray back and forth 2020-12-09 15:07:29 +02:00
dont_crash_no_border.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
dont_crash_reinitialize_compositor.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
dont_crash_useractions_menu.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
emptywindow.qml InputMethodTest: provide a process to launch when we need a virtual keyboard 2021-05-11 12:47:41 +02:00
generic_scene_opengl_test.cpp Avoid converting socket name between QString and QByteArray back and forth 2020-12-09 15:07:29 +02:00
generic_scene_opengl_test.h Prettify license headers 2020-08-07 19:57:56 +00:00
globalshortcuts_test.cpp GlobalShortcutsTest: No need to make the test longer than it needs to be 2021-05-11 12:38:00 +02:00
idle_inhibition_test.cpp autotests: Introduce own idle inhibit v1 helpers 2021-05-14 05:36:08 +00:00
input_stacking_order.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
inputmethod_test.cpp InputMethodTest: provide a process to launch when we need a virtual keyboard 2021-05-11 12:47:41 +02:00
internal_window.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
keyboard_layout_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
keymap_creation_failure_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
kwin_wayland_test.cpp autotests: Fix XwaylandInputTest 2021-05-13 11:44:41 +00:00
kwin_wayland_test.h autotests: Stabilize tests that create Xwayland windows 2021-05-15 16:16:48 +00:00
kwinbindings_test.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
layershellv1client_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
lockscreen.cpp Prepend "Interactive" to interactive move resize methods 2021-05-16 13:50:25 +03:00
maximize_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
modifier_only_shortcut_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
move_resize_window_test.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
nightcolor_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
no_global_shortcuts_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
no_xdg_runtime_dir_test.cpp Avoid converting socket name between QString and QByteArray back and forth 2020-12-09 15:07:29 +02:00
outputmanagement_test.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
placement_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
plasma_surface_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
plasmawindow_test.cpp autotests: Stabilize tests that create Xwayland windows 2021-05-15 16:16:48 +00:00
platformcursor.cpp Avoid converting socket name between QString and QByteArray back and forth 2020-12-09 15:07:29 +02:00
pointer_constraints_test.cpp Prepend "Interactive" to interactive move resize methods 2021-05-16 13:50:25 +03:00
pointer_input.cpp Prepend "Interactive" to interactive move resize methods 2021-05-16 13:50:25 +03:00
quick_tiling_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
scene_opengl_es_test.cpp Prettify license headers 2020-08-07 19:57:56 +00:00
scene_opengl_shadow_test.cpp Remove shadow related bits in Scene::Window 2021-05-19 14:13:47 +03:00
scene_opengl_test.cpp Prettify license headers 2020-08-07 19:57:56 +00:00
scene_qpainter_shadow_test.cpp Remove shadow related bits in Scene::Window 2021-05-19 14:13:47 +03:00
scene_qpainter_test.cpp autotests: Stabilize tests that create Xwayland windows 2021-05-15 16:16:48 +00:00
screen_changes_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
screenedge_client_show_test.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
screens_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
shade_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
showing_desktop_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
stacking_order_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
struts_test.cpp Prepend "Interactive" to interactive move resize methods 2021-05-16 13:50:25 +03:00
tabbox_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
test_helpers.cpp autotests: Stabilize tests that create Xwayland windows 2021-05-15 16:16:48 +00:00
test_virtualkeyboard_dbus.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
touch_input_test.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
transient_placement.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
virtual_desktop_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
window_rules_test.cpp autotests: Stabilize tests that create Xwayland windows 2021-05-15 16:16:48 +00:00
window_selection_test.cpp autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
x11_client_test.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
xdgshellclient_rules_test.cpp Prepend "Interactive" to interactive move resize methods 2021-05-16 13:50:25 +03:00
xdgshellclient_test.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
xwayland_input_test.cpp autotests: Stabilize tests that create Xwayland windows 2021-05-15 16:16:48 +00:00
xwayland_selections_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
xwaylandserver_crash_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00
xwaylandserver_restart_test.cpp Ensure we start our tests with wayland already initialised 2021-05-10 12:33:43 +00:00