Bug 380440

Summary: [since Plasma 5.10.0] "Switch desktop on edge" when moving windows not working
Product: [Plasma] kwin Reporter: Stefan L <stefan.loewen>
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bernie, bhush94, bugs, daniel-edler, kde, plasma-bugs, rikmills
Priority: NOR Keywords: regression
Version: 5.10.0Flags: mgraesslin: Wayland+
mgraesslin: X11+
mgraesslin: ReviewRequest+
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://phabricator.kde.org/D6257
See Also: https://bugs.kde.org/show_bug.cgi?id=381849
Latest Commit: Version Fixed In: 5.10.3
Sentry Crash Report:
Attachments: Possible patch

Description Stefan L 2017-06-01 20:55:34 UTC
Operating System: KDE neon User Edition 5.10

Short description:
-------------------
Since updating to Plasma 5.10 switching the desktop when moving a desktop to an edge does not work anymore.
This bug appears with [System Settings -> Desktop Behavior -> Screen Edges -> Switch desktop on edge] set to "Only When Moving Windows".

Steps to reproduce:
------------------
1. Set [System Settings -> Desktop Behavior -> Screen Edges -> Switch desktop on edge] to "Only When Moving Windows"
2. Update to Plasma 5.10
3. Drag a window (either by the titlebar or with Alt+Leftclick) against a screen edge.

Expected Behavior:
--------------------
A desktop switch should be triggered.

Actual Behavior:
----------------
Nothing happens.
Comment 1 Rik Mills 2017-06-03 20:56:51 UTC
I see the same issue on both Kubuntu and KDE Neon 5.10 packages.
Comment 2 Kai Uwe Broulik 2017-06-08 07:46:02 UTC
*** Bug 380959 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2017-06-13 15:55:52 UTC
*** Bug 381139 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Feck 2017-06-13 15:56:25 UTC
Maybe related to bug 380476.
Comment 5 Martin Flöser 2017-06-17 12:42:42 UTC
(In reply to Christoph Feck from comment #4)
> Maybe related to bug 380476.

unlikely. The code path for moving the windows to different vd is different and doesn't use the windows at all.
Comment 6 Martin Flöser 2017-06-17 13:23:26 UTC
Issue can be reproduced on both X11 and Wayland. I have an idea of what went wrong.
Comment 7 Martin Flöser 2017-06-17 14:55:33 UTC
Created attachment 106145 [details]
Possible patch

Attached is a possible patch for the problem. I'm also going to try to create an autotest for it, so that it cannot regress again.
Comment 8 Martin Flöser 2017-06-18 11:40:08 UTC
Patch with autotest at: https://phabricator.kde.org/D6257
Comment 9 Martin Flöser 2017-06-20 05:08:28 UTC
Git commit c45e165514ec70314d721d6e0238431ab92bd441 by Martin Flöser.
Committed on 20/06/2017 at 04:57.
Pushed by graesslin into branch 'Plasma/5.10'.

Fix switch desktop through edge when moving window

Summary:
There was a regression introduced in ScreenEdges when introducing the
activatesForPointer method. It considered the switch desktop on edge,
but not the special case of switch desktop when moving windows. Due to
that the edges did not activate when moving the window.

This change addresses the regression and extends the autotest to ensure
it's properly covered.
FIXED-IN: 5.10.3

Test Plan: Manual testing and extended auto test

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6257

M  +11   -0    autotests/mock_abstract_client.cpp
M  +3    -0    autotests/mock_abstract_client.h
M  +0    -5    autotests/mock_client.cpp
M  +0    -2    autotests/mock_client.h
M  +21   -0    autotests/test_screen_edges.cpp
M  +6    -0    screenedge.cpp

https://commits.kde.org/kwin/c45e165514ec70314d721d6e0238431ab92bd441