Bug 416576 - Incorrect drag-n-drop behaviour in 'Desktop Grid' switcher.
Summary: Incorrect drag-n-drop behaviour in 'Desktop Grid' switcher.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-desktop-grid (show other bugs)
Version: 5.17.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-22 13:22 UTC by Akshay Naik
Modified: 2022-05-06 10:46 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25


Attachments
drag and drop not working - desktop grid layout "pager" (3.79 MB, video/x-matroska)
2022-02-13 12:11 UTC, brintal
Details
settings breaking present window effect but allowing drag and drop (3.09 MB, video/x-matroska)
2022-02-13 12:20 UTC, brintal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Akshay Naik 2020-01-22 13:22:46 UTC
SUMMARY
Cannot drag-n-drop windows between two screens which are part of the same virtual desktop when using desktop grid.


STEPS TO REPRODUCE
1. Set up two virtual desktops with two screens on Plasma.
2. Engage 'Desktop Grid' effect(Ctrl-F8 by default).
3. Try to drag-and-drop a window from one screen-1 to screen-2.

OBSERVED RESULT
Can move window from screen-1 + desktop-1 to screen-2 + desktop-2, but cannot move the same window from screen-1 + desktop-1 to screen-2-desktop-1. i.e. Cannot move a window between two screens that make up the same virtual desktop.


EXPECTED RESULT
The above behaviour should be possible.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.13.2
(KDE neon 5.17.5, Kernel 5.0.0-37-generic)

ADDITIONAL INFORMATION

Also reproduced on earlier version.
 KDE Plasma Version: 5.12.9
 KDE Frameworks Version: 5.44.0
 Qt Version: 5.9.5
Comment 1 Akshay Naik 2020-01-23 17:31:35 UTC
UPDATE: This bug(?) is due to interaction between the "Desktop Grid" and "Present Windows" effects. Disabling the Desktop Grid effect(via kcm config) from using the Present windows effect to display the windows results in correct behavior.
Comment 2 Jens N 2021-11-29 13:42:20 UTC
(In reply to Akshay Naik from comment #1)
> UPDATE: This bug(?) is due to interaction between the "Desktop Grid" and
> "Present Windows" effects. Disabling the Desktop Grid effect(via kcm config)
> from using the Present windows effect to display the windows results in
> correct behavior.

Can you explain in a bit more detail how you managed to work around this bug? For me it's still not working in either "Desktop Grid" or "Present Windows" and I didn't manage to find the "kcm config" option you're talking about. 

As far as my google research has brought me so far "kcm config" (which does not exists as shell command for me) should be the "Window Management" part of the settings application and I did not find anything matching your description there.
Comment 3 brintal 2022-02-13 12:11:49 UTC
Created attachment 146667 [details]
drag and drop not working - desktop grid layout "pager"

I added a screen recording demonstrating that bug.
Moving Windows to different Monitor but same Virtual Desktop does not work.
Moving Windows to different Monitor but DIFFERENT Virtual Desktop works.
In my case the bug only seems to happen when choosing Layout Mode "Pager" (aka vertical layout) in the Desktop Grid Settings (System Settings -> Workspace Behavior -> Desktop Effects -> Desktop Grid).
When changing back to the default "Automatic" Layout mode, the bug does not happen.
Comment 4 brintal 2022-02-13 12:20:05 UTC
Created attachment 146668 [details]
settings breaking present window effect but allowing drag and drop

Another observation.
When choosing the settings 
"Layout Mode Pager", "Switch desktop only" and disabling "Show buttons to alter count of virtual desktops"
the present windows effect seems to be broken. There is some weird artefacts and the drag and drop is less smooth (one has to really push the cursor onto the other monitor...don't know if that makes sense).
But surprisingly the window can be successfully moved from one monitor to the other. Even with the layout "pager" activated.
Comment 5 brintal 2022-02-13 12:36:45 UTC
(In reply to Jens N from comment #2)
> (In reply to Akshay Naik from comment #1)
> > UPDATE: This bug(?) is due to interaction between the "Desktop Grid" and
> > "Present Windows" effects. Disabling the Desktop Grid effect(via kcm config)
> > from using the Present windows effect to display the windows results in
> > correct behavior.
> 
> Can you explain in a bit more detail how you managed to work around this
> bug? For me it's still not working in either "Desktop Grid" or "Present
> Windows" and I didn't manage to find the "kcm config" option you're talking
> about. 
> 
> As far as my google research has brought me so far "kcm config" (which does
> not exists as shell command for me) should be the "Window Management" part
> of the settings application and I did not find anything matching your
> description there.

I think he means to just disable "Present Windows" under System Settings -> Workspace Behavior -> Desktop Effects.
I can confirm that it seems to kinda work but the behavior seems to be similar to what I described in Comment 4.
But at least the drag and drop works consistently then. Another workaround seems to be just to switch to the "Automatic" Layout in the Desktop Grid Settings. But both of these workarounds are not really satisfactory in a vertical virtual desktop layout (which IMO is the only layout that makes sense in a multi monitor setup).
Comment 6 Marco Martin 2022-05-06 10:46:29 UTC
Git commit 7a4cabf3287e82e7d1d6ba84b8b059ab470f9f42 by Marco Martin.
Committed on 06/05/2022 at 10:44.
Pushed by mart into branch 'master'.

QML version of the Desktop Grid effect

Replace completely the old desktop grid effect with a QML version.
Aims to feature parity and be a change as transparent as possible for the user.
Related: bug 433071, bug 452625, bug 443971, bug 437121, bug 452925, bug 437928, bug 452439, bug 288530, bug 450254, bug 450106, bug 447832, bug 449960, bug 441862, bug 444859, bug 445999, bug 422117, bug 404627, bug 435483, bug 420744, bug 435482, bug 427055, bug 333445, bug 429120, bug 427391, bug 409295, bug 294322, bug 356955
FIXED-IN: 5.25

M  +5    -0    src/effects.cpp
M  +10   -5    src/effects/desktopgrid/CMakeLists.txt
D  +0    -1571 src/effects/desktopgrid/desktopgrid.cpp
D  +0    -186  src/effects/desktopgrid/desktopgrid.h
D  +0    -32   src/effects/desktopgrid/desktopgrid.kcfg
M  +6    -14   src/effects/desktopgrid/desktopgrid_config.cpp
M  +2    -2    src/effects/desktopgrid/desktopgrid_config.h
M  +68   -144  src/effects/desktopgrid/desktopgrid_config.ui
A  +32   -0    src/effects/desktopgrid/desktopgridconfig.kcfg
M  +5    -1    src/effects/desktopgrid/desktopgridconfig.kcfgc
A  +342  -0    src/effects/desktopgrid/desktopgrideffect.cpp     [License: GPL(v2.0+)]
A  +108  -0    src/effects/desktopgrid/desktopgrideffect.h     [License: GPL(v2.0+)]
M  +5    -4    src/effects/desktopgrid/main.cpp
D  +0    -26   src/effects/desktopgrid/main.qml
M  +1    -0    src/effects/desktopgrid/metadata.json
A  +255  -0    src/effects/desktopgrid/qml/DesktopView.qml     [License: GPL(v2.0+)]
A  +193  -0    src/effects/desktopgrid/qml/main.qml     [License: GPL(v2.0+)]
M  +22   -5    src/effects/private/qml/WindowHeap.qml
M  +21   -3    src/libkwineffects/kwineffects.h
M  +4    -1    src/libkwineffects/kwinquickeffect.cpp

https://invent.kde.org/plasma/kwin/commit/7a4cabf3287e82e7d1d6ba84b8b059ab470f9f42