STEPS TO REPRODUCE 1. open some gtk csd window under Wayland (gnome disks, pitivi video editor, pulseeffects, etc) 2. while the window is not maximized, try to resize it manually by dragging some window border 3. OBSERVED RESULT weird behaviors: Sometimes the window size increases instead decreases, sometimes the window size changes immediately after I start to drag the window border, window size does not track cursor movements correctly. EXPECTED RESULT the window is resized correctly. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.14.90 KDE Frameworks Version: 5.54.0 Qt Version: 5.12.0 ADDITIONAL INFORMATION the same windows can be resized correctly under X11.
it does't work either by alt + right click kwin and gtk is broken
I have this problem too and I also reported it on gnome bugtracker but there hasn't been any activity in 8 months, see: https://gitlab.gnome.org/GNOME/gtk/issues/1163
(In reply to mthw0 from comment #2) > I have this problem too and I also reported it on gnome bugtracker but there > hasn't been any activity in 8 months, see: > https://gitlab.gnome.org/GNOME/gtk/issues/1163 This is clearly a bug on our side.
I remember this from a report a while ago. When dragging, kwin has protection that it only sends one resize event at a time, then blocks till the app re-renders before sending the next so that it can track the correct pending topleft position. It made sense on X and wl_surface. We sometimes send a configure event twice with the same size. Qt responds, GTK does not which is legitimate behaviour, then we deadlock till the timeout. We don't need this request behaviour since we added proper configure ack handling. If I do: bool ShellClient::isWaitingForMoveResizeSync() const { return false; } everything still great and is faster too.
Git commit 985601e0a41a84ffab51bc942824bd48bc8a6290 by David Edmundson. Committed on 09/04/2019 at 10:14. Pushed by davidedmundson into branch 'master'. [wayland] Queue XDG configure requests when resizing toplevel interactively Summary: When resizing a window particularly from the left side, we need to co-ordinate moving the window with when we get the resized buffer. The code in AbstractClient::handleMoveResize checks isWaitingForResizSync to make sure we never send more than one resize request at a time to keep that in sync. This makes sense on X and wl_shell_surface, but not on XDGShell where we can track which resize events have been handled by the client. ShellClient already keeps a stack of our pending configure requests and handles everything appropriately, we don't need to block. This results in a smoother dragging experience and avoids a potential deadlock currently seen when a client may not reply to a no-op configure request. Test Plan: Async ack handling is covered by existing unit tests Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D20397 M +8 -3 shell_client.cpp https://commits.kde.org/kwin/985601e0a41a84ffab51bc942824bd48bc8a6290
Git commit bc83065cebd7ac855966da52edd1afcaf0fc2865 by David Edmundson. Committed on 10/05/2019 at 15:34. Pushed by davidedmundson into branch 'master'. Handle XdgShell window geometry in configure request sizes Summary: The size passed to an XDG shell configure request should match the window size of the given window, we don't want to include the size of any shadows that may be drawn by the client. Kwin has the same concept of geometry for both window management, input and rendering. In order to approach this in a way that does not risk any regressions with kwin's current structure AbstractClient::geometry remains the canonical source and we handle the window within that internally within ShellClient treating the windowGeometry as a set of margins from this. This is part of a much bigger task (T10867). This patch addresses windows growing when starting a drag based resize. Test Plan: Unit test gtk3-demo Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D20937 M +36 -0 autotests/integration/shell_client_test.cpp M +44 -4 shell_client.cpp M +5 -0 shell_client.h https://commits.kde.org/kwin/bc83065cebd7ac855966da52edd1afcaf0fc2865
Matching kwayland commit missed the freeze :( Reopening to remind me to merge into master after we branch and after my wayland patch gets accepted
Plasma 5.16 has branched, so this can probably go in again.
Re-landed in 5.17 with https://commits.kde.org/kwin/1b9eaa62c26c407022e8a64ec33b391860af0e5d