kwin/src
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
..
3rdparty 3rdparty: Synchronize xcursor.c with upstream 2021-05-04 09:40:29 +00:00
decorations decoration: Fix rendering issues with scale factors < 1 2021-04-26 11:41:37 +00:00
effects Abstract startup semantics in the startupfeedback effect 2021-05-24 17:19:08 +02:00
helpers Correct use of KUIT markup in kill dialog text 2021-03-24 16:46:30 -06:00
kcmkwin [kcmkwin/kwindesktop] Implement valueFromText in a spinbox 2021-05-24 18:51:07 +00:00
libinput libinput: bump required version 2021-05-14 17:47:46 +00:00
libkwineffects Abstract startup semantics in the startupfeedback effect 2021-05-24 17:19:08 +02:00
platformsupport Remove unused class forward declarations in scene.h 2021-05-18 12:24:56 +03:00
plugins platforms/drm: Make context current before EGLStreams calls 2021-05-24 13:51:18 +00:00
qml Port kwin from Plasma Components2 2021-03-27 23:26:31 +00:00
scripting Q_ENUMS -> Q_ENUM 2021-05-14 01:35:33 +02:00
scripts Port kwin from Plasma Components2 2021-03-27 23:26:31 +00:00
tabbox Expose compositing status to Switcher QtQuick item 2021-05-13 18:50:11 +00:00
xwl [xwl] Notify wayland that our data offer is accepted 2021-05-24 14:06:57 +00:00
abstract_client.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
abstract_client.h Rework async geometry updates 2021-05-25 06:17:41 +00:00
abstract_opengl_context_attribute_builder.cpp
abstract_opengl_context_attribute_builder.h
abstract_output.cpp wayland: Generate valid output uuids 2021-04-08 19:04:17 +00:00
abstract_output.h wayland: Generate valid output uuids 2021-04-08 19:04:17 +00:00
abstract_wayland_output.cpp don't set vrr policy on incompatible monitors 2021-05-02 00:06:39 +00:00
abstract_wayland_output.h Wayland: variable refresh rate support 2021-04-30 16:18:39 +02:00
activation.cpp Remove Workspace::updateClientLayer() 2021-05-16 10:48:06 +00:00
activities.cpp Get Activities to depend only on AbstractClient 2021-03-09 15:22:55 +00:00
activities.h Get Activities to depend only on AbstractClient 2021-03-09 15:22:55 +00:00
appmenu.cpp
appmenu.h
atoms.cpp
atoms.h
client_machine.cpp
client_machine.h
CMakeLists.txt xdg_activation_v1 implementation 2021-05-24 17:19:25 +02:00
colordevice.cpp
colordevice.h
colormanager.cpp Refactor session code 2021-03-23 08:01:19 +00:00
colormanager.h
composite.cpp Remove Platform::areOutputsEnabled() 2021-04-29 10:47:41 +00:00
composite.h Move insertion of safety points to X11Compositor 2021-04-05 07:27:10 +00:00
config-kwin.h.cmake Make libdrm required dependency 2021-05-14 18:00:40 +00:00
cursor.cpp
cursor.h
dbusinterface.cpp
dbusinterface.h
debug_console.cpp Add ther layer property in debug console 2021-05-18 13:35:12 +00:00
debug_console.h debug_console: Improve rendering of non-x11 clients 2021-04-08 16:01:34 +00:00
debug_console.ui
decorationitem.cpp scene: Introduce window items 2021-03-31 13:56:55 +00:00
decorationitem.h scene: Introduce window items 2021-03-31 13:56:55 +00:00
deleted.cpp Replace Toplevel::clientContentPos() with a better solution 2021-05-17 06:32:21 +00:00
deleted.h Replace Toplevel::clientContentPos() with a better solution 2021-05-17 06:32:21 +00:00
dmabuftexture.cpp
dmabuftexture.h
effectloader.cpp Use qAsConst in fors when there's a risk for it to detach 2021-05-14 01:35:33 +02:00
effectloader.h
effects.cpp effects: Fix EffectWindow::shape() for X11 windows 2021-05-18 12:28:27 +00:00
effects.h Make scale and glide effect ignore lockscreen greeter 2021-05-13 05:46:30 +00:00
egl_context_attribute_builder.cpp
egl_context_attribute_builder.h
events.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
focuschain.cpp
focuschain.h Only mark slots as slots 2021-05-14 01:35:33 +02:00
ftrace.cpp Use preferred QFileInfo::exists API as documented 2021-05-14 01:35:33 +02:00
ftrace.h ftrace: use quint32 for context counter 2021-02-24 23:45:19 +00:00
geometrytip.cpp
geometrytip.h
gestures.cpp
gestures.h
globalshortcuts.cpp Use qAsConst in fors when there's a risk for it to detach 2021-05-14 01:35:33 +02:00
globalshortcuts.h GlobalShortcuts: clang-format 2021-04-05 19:28:38 +00:00
group.cpp
group.h
idle_inhibition.cpp
idle_inhibition.h
input.cpp Prepend "Interactive" to interactive move resize methods 2021-05-16 13:50:25 +03:00
input.h Introduce transient constraints api in Workspace 2021-05-12 11:50:38 +00:00
input_event.cpp
input_event.h
input_event_spy.cpp
input_event_spy.h
inputmethod.cpp inputmethod: warn when we're committing strings to noone 2021-05-24 14:16:23 +02:00
inputmethod.h inputmethod: Also update the trackingClient when there's none set 2021-05-24 14:16:23 +02:00
inputpanelv1client.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
inputpanelv1client.h Rework async geometry updates 2021-05-25 06:17:41 +00:00
inputpanelv1integration.cpp
inputpanelv1integration.h
internal_client.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
internal_client.h Rework async geometry updates 2021-05-25 06:17:41 +00:00
item.cpp Rename Item::scheduleRepaint() 2021-05-19 12:50:11 +00:00
item.h Rename Item::scheduleRepaint() 2021-05-19 12:50:11 +00:00
keyboard_input.cpp fix global shortcuts for non-Latin symbols 2021-04-05 19:39:06 +00:00
keyboard_input.h
keyboard_layout.cpp Revert "Register unique service name when wayland keyboard interface is in use" 2021-05-11 22:37:42 +03:00
keyboard_layout.h
keyboard_layout_switching.cpp
keyboard_layout_switching.h
keyboard_repeat.cpp wayland: Adjust kwin to SeatInterface changes 2021-03-11 07:36:31 +00:00
keyboard_repeat.h
killwindow.cpp
killwindow.h
kwin.kcfg platforms/drm: put double tap timer behind config option 2021-05-11 00:47:21 +00:00
kwin.notifyrc SVN_SILENT made messages (.desktop file) - always resolve ours 2021-04-23 01:18:39 +00:00
kwinbindings.cpp
layers.cpp workspace: Unify client removal code 2021-05-24 23:16:41 +00:00
layershellv1client.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
layershellv1client.h Rework async geometry updates 2021-05-25 06:17:41 +00:00
layershellv1integration.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
layershellv1integration.h
linux_dmabuf.cpp
linux_dmabuf.h
main.cpp Refactor session code 2021-03-23 08:01:19 +00:00
main.h Refactor session code 2021-03-23 08:01:19 +00:00
main_wayland.cpp Make libdrm required dependency 2021-05-14 18:00:40 +00:00
main_wayland.h inputmethod: Move the input method process into the InputMethod class 2021-04-29 11:04:19 +00:00
main_x11.cpp Refactor session code 2021-03-23 08:01:19 +00:00
main_x11.h Refactor session code 2021-03-23 08:01:19 +00:00
Messages.sh
modifier_only_shortcuts.cpp
modifier_only_shortcuts.h
moving_client_x11_filter.cpp
moving_client_x11_filter.h
netinfo.cpp
netinfo.h
onscreennotification.cpp
onscreennotification.h
options.cpp
options.h Prefer Q_ENUM to Q_ENUMS 2021-05-14 01:35:33 +02:00
org.kde.kappmenu.xml
org.kde.kwin.Compositing.xml
org.kde.kwin.Effects.xml
org.kde.KWin.Plugins.xml
org.kde.KWin.Session.xml
org.kde.KWin.VirtualDesktopManager.xml
org.kde.KWin.xml
osd.cpp
osd.h GIT_SILENT Add trailing comma to enums 2021-03-14 18:06:22 +01:00
outline.cpp
outline.h
overlaywindow.cpp
overlaywindow.h
placement.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
placement.h
platform.cpp Remove Platform::screenGeometries and Platform::screenScales 2021-04-29 11:31:31 +00:00
platform.h Remove Platform::screenGeometries and Platform::screenScales 2021-04-29 11:31:31 +00:00
plugin.cpp
plugin.h
pluginmanager.cpp
pluginmanager.h
pointer_input.cpp Replace Toplevel::clientContentPos() with a better solution 2021-05-17 06:32:21 +00:00
pointer_input.h wayland: Adjust kwin to PointerInterface changes 2021-03-10 14:10:16 +00:00
popup_input_filter.cpp wayland: Switch to new keyboard event notify methods in SeatInterface 2021-03-26 12:33:12 +02:00
popup_input_filter.h PopupEventFilter: handle keyboard events too 2021-03-25 12:38:43 +00:00
renderjournal.cpp
renderjournal.h
renderloop.cpp Wayland: variable refresh rate support 2021-04-30 16:18:39 +02:00
renderloop.h Wayland: variable refresh rate support 2021-04-30 16:18:39 +02:00
renderloop_p.h Wayland: variable refresh rate support 2021-04-30 16:18:39 +02:00
rootinfo_filter.cpp
rootinfo_filter.h
rulebooksettings.cpp
rulebooksettings.h
rulebooksettingsbase.kcfg
rulebooksettingsbase.kcfgc
rules.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
rules.h
rulesettings.kcfg
rulesettings.kcfgc
scene.cpp Remove shadow related bits in Scene::Window 2021-05-19 14:13:47 +03:00
scene.h Remove shadow related bits in Scene::Window 2021-05-19 14:13:47 +03:00
screenedge.cpp Prepend "Interactive" to interactive move resize methods 2021-05-16 13:50:25 +03:00
screenedge.h GIT_SILENT Add trailing comma to enums 2021-03-14 18:06:22 +01:00
screenlockerwatcher.cpp
screenlockerwatcher.h
screens.cpp Limit VRR policy in support information only to Wayland session 2021-05-05 16:55:18 +03:00
screens.h Wayland: variable refresh rate support 2021-04-30 16:18:39 +02:00
service_utils.cpp
service_utils.h
session.cpp wayland: Remove direct session 2021-05-24 06:23:00 +00:00
session.h wayland: Remove direct session 2021-05-24 06:23:00 +00:00
session_consolekit.cpp Explicitly cast major() and minor() to uints 2021-04-27 12:02:38 +03:00
session_consolekit.h Refactor session code 2021-03-23 08:01:19 +00:00
session_logind.cpp wayland: Port logind session from GetSessionByPID 2021-05-14 12:59:26 +00:00
session_logind.h Refactor session code 2021-03-23 08:01:19 +00:00
session_noop.cpp Refactor session code 2021-03-23 08:01:19 +00:00
session_noop.h Refactor session code 2021-03-23 08:01:19 +00:00
settings.kcfgc
shadow.cpp Remove shadow related bits in Scene::Window 2021-05-19 14:13:47 +03:00
shadow.h Introduce signals to notify about Shadow changes 2021-03-31 13:56:55 +00:00
shadowitem.cpp scene: Introduce window items 2021-03-31 13:56:55 +00:00
shadowitem.h scene: Introduce window items 2021-03-31 13:56:55 +00:00
shortcutdialog.ui
sm.cpp workspace: Unify client removal code 2021-05-24 23:16:41 +00:00
sm.h GIT_SILENT Add trailing comma to enums 2021-03-14 18:06:22 +01:00
subsurfacemonitor.cpp wayland: Track already existing subsurfaces in SubSurfaceMonitor 2021-02-24 10:25:36 +02:00
subsurfacemonitor.h
surfaceitem.cpp Decouple window pixmaps from scene windows 2021-05-18 09:11:24 +00:00
surfaceitem.h Remove Scene::Window::{discard,update}Pixmap 2021-05-19 11:10:50 +00:00
surfaceitem_internal.cpp Decouple window pixmaps from scene windows 2021-05-18 09:11:24 +00:00
surfaceitem_internal.h Decouple window pixmaps from scene windows 2021-05-18 09:11:24 +00:00
surfaceitem_wayland.cpp Rename Item::scheduleRepaint() 2021-05-19 12:50:11 +00:00
surfaceitem_wayland.h Remove unused class forward declarations in scene.h 2021-05-18 12:24:56 +03:00
surfaceitem_x11.cpp Rename Item::scheduleRepaint() 2021-05-19 12:50:11 +00:00
surfaceitem_x11.h Decouple window pixmaps from scene windows 2021-05-18 09:11:24 +00:00
syncalarmx11filter.cpp
syncalarmx11filter.h
tablet_input.cpp
tablet_input.h
tabletmodemanager.cpp --warning: Don't try to connect to a null object 2021-02-18 20:03:06 +01:00
tabletmodemanager.h
thumbnailitem.cpp
thumbnailitem.h
toplevel.cpp Remove shadow related bits in Scene::Window 2021-05-19 14:13:47 +03:00
toplevel.h Remove shadow related bits in Scene::Window 2021-05-19 14:13:47 +03:00
touch_hide_cursor_spy.cpp
touch_hide_cursor_spy.h
touch_input.cpp wayland: Adjust input code to SeatInterface with some renamed methods 2021-03-12 10:19:47 +00:00
touch_input.h wayland: Fix handling of synthetic touch cancel events 2021-02-16 17:53:30 +00:00
udev.cpp platforms/drm: Introduce KWIN_DRM_DEVICES 2021-05-01 12:14:34 +00:00
udev.h platforms/drm: Introduce KWIN_DRM_DEVICES 2021-05-01 12:14:34 +00:00
unmanaged.cpp Unvirtualize Toplevel::bufferGeometry() 2021-05-16 10:48:41 +00:00
unmanaged.h Unvirtualize Toplevel::bufferGeometry() 2021-05-16 10:48:41 +00:00
useractions.cpp useractions: Remove redundant logic 2021-05-11 12:38:00 +02:00
useractions.h
utils.cpp decoration: Fix rendering issues with scale factors < 1 2021-04-26 11:41:37 +00:00
utils.h Add ther layer property in debug console 2021-05-18 13:35:12 +00:00
virtualdesktops.cpp Use qAsConst in fors when there's a risk for it to detach 2021-05-14 01:35:33 +02:00
virtualdesktops.h
virtualdesktopsdbustypes.cpp
virtualdesktopsdbustypes.h
virtualkeyboard_dbus.cpp inputmethod: Refactor VirtualKeyboardDBus to have its own InputMethpd 2021-03-02 13:55:35 +00:00
virtualkeyboard_dbus.h inputmethod: Refactor VirtualKeyboardDBus to have its own InputMethpd 2021-03-02 13:55:35 +00:00
was_user_interaction_x11_filter.cpp
was_user_interaction_x11_filter.h
wayland_server.cpp xdg_activation_v1 implementation 2021-05-24 17:19:25 +02:00
wayland_server.h xdg_activation_v1 implementation 2021-05-24 17:19:25 +02:00
waylandclient.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
waylandclient.h Rework async geometry updates 2021-05-25 06:17:41 +00:00
waylandoutput.cpp wayland: Use new api to remove globals safely 2021-05-12 11:31:36 +00:00
waylandoutput.h wayland: Use new api to remove globals safely 2021-05-12 11:31:36 +00:00
waylandoutputdevice.cpp wayland: Use new api to remove globals safely 2021-05-12 11:31:36 +00:00
waylandoutputdevice.h wayland: Use new api to remove globals safely 2021-05-12 11:31:36 +00:00
waylandshellintegration.cpp
waylandshellintegration.h
window_property_notify_x11_filter.cpp
window_property_notify_x11_filter.h
windowitem.cpp scene: Introduce window items 2021-03-31 13:56:55 +00:00
windowitem.h scene: Introduce window items 2021-03-31 13:56:55 +00:00
workspace.cpp Keep lostLeader code under removeX11Client 2021-05-25 02:29:19 +02:00
workspace.h workspace: Unify client removal code 2021-05-24 23:16:41 +00:00
x11client.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
x11client.h Rework async geometry updates 2021-05-25 06:17:41 +00:00
x11eventfilter.cpp x11: Move event filter logic to kwinApp() 2021-03-23 08:01:19 +00:00
x11eventfilter.h
xcbutils.cpp
xcbutils.h
xcursortheme.cpp wayland: Fix loading of HiDPI cursors 2021-05-03 10:52:25 +03:00
xcursortheme.h wayland: Fix loading of HiDPI cursors 2021-05-03 10:52:25 +03:00
xdgactivationv1.cpp xdg_activation_v1 implementation 2021-05-24 17:19:25 +02:00
xdgactivationv1.h xdg_activation_v1 implementation 2021-05-24 17:19:25 +02:00
xdgshellclient.cpp Rework async geometry updates 2021-05-25 06:17:41 +00:00
xdgshellclient.h Rework async geometry updates 2021-05-25 06:17:41 +00:00
xdgshellintegration.cpp
xdgshellintegration.h
xkb.cpp Apply 1 suggestion(s) to 1 file(s) 2021-04-15 15:00:52 +00:00
xkb.h fix global shortcuts for non-Latin symbols 2021-04-05 19:39:06 +00:00
xwaylandclient.cpp scene: Introduce window items 2021-03-31 13:56:55 +00:00
xwaylandclient.h wayland: Mark Xwayland windows ready for painting when mapped 2021-03-31 13:56:55 +00:00