Bug 479822 - Stuck dragging non-existant window after workspace move
Summary: Stuck dragging non-existant window after workspace move
Status: REOPENED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.27.10
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-14 22:59 UTC by xanderlenstra
Modified: 2024-02-23 12:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xanderlenstra 2024-01-14 22:59:56 UTC
SUMMARY
***
Short version:
Moving a window with a keyboard shortcut to a different workspace while simultaneously dragging that window using the mouse leads to very strange behaviour which almost forces a reboot.

Long version:
I'm running kubuntu 22.04 and make heavy use of its feature to use multiple workspaces. I've created a keyboard shortcut to switch between different workspaces moving the active/focused window with me. Recently I tried dragging a window and then accidentally used the shortcut at the same time. This did indeed move the application to the other workspace, but afterwards strange things happened. My cursor still showed the symbol used for dragging a window, but I could not see any window I was dragging. Furthermore, even when clicking on other windows, I could not get focus on those windows. Some general keyboard shortcuts, such as alt+tab, switching workspaces or opening the start menu with the meta key still worked, but I lost focus on all those applications immediately and was unable to do anything in those windows. I was able to switch to a different TTY-session and kill plasmashell there, but that didn't solve the issue. The only thing I could find that worked was running `sudo systemctl restart display-manager`, which I think restarts either kwin or the eniter X server? Not sure.
***


STEPS TO REPRODUCE
1. Set up a keyboard shortcut for 'Window One Desktop Down' (or other direction)
2. Start dragging a window
3. While dragging, use the keyboard shortcut

OBSERVED RESULT
You're stuck in a state where you cannot focus any window and are seemingly dragging nothing

EXPECTED RESULT
Yes

SOFTWARE/OS VERSIONS
~Windows:~
~macOS:~
Linux/KDE Plasma: Kubuntu 22.04
(available in About System)
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Running X11, not sure if that matters
Comment 1 Nate Graham 2024-01-17 15:53:53 UTC
I'm afraid Plasma 5.24 is unfortunately no longer eligible for support or maintenance from KDE.

Plasma is a fast-moving project, and bugs in one version are often fixed in the next one. Please update to Plasma 5.27 LTS as soon as your distro offers it to you. If you need support for Plasma 5.24, please contact your distro, who bears the responsibility of providing support for older non-LTS releases.

If this issue is still reproducible in Plasma 5.27, feel free to re-open this bug report.

Thanks for understanding!
Comment 2 xanderlenstra 2024-01-18 13:21:40 UTC
I've updated to Plasma 5.27.10 and was able to reproduce the bug.
Comment 3 Nate Graham 2024-01-18 21:40:50 UTC
Thanks for confirming!
Comment 4 Oded Arbel 2024-02-23 12:13:51 UTC
This issue is also apparent in Plasma 6 (at least on Wayland). The main issue, I believe, is that after moving a window to another virtual desktop - it is still the currently active window, even though it is not visible.

You don't need to be dragging the window to have a problem with that - without dragging, after using the keyboard to open the window operation menu, navigating to "Desktops" and then to "Move to X", after pressing ENTER the window disappears but no other window is active. If you press the window operations menu shortcut again you'll get the window operations menu of the window that is on the other desktop. You can bring it back (maybe its a feature?) or do other things - for example if you have a virtual desktop page panel widget that shows windows outlines you can start a "Move" operation and see how the window is moved on the other desktop. Not very useful, but entertaining.

I believe this issue is the same as bug #450405, though on Wayland there is the crink with XWayland: XWayland windows moved to another desktop do not remain the active window - if you do that in the middle of the drag, they are still being dragged around but they will not take keyboard input and can not be acted on using window-specific Kwin shortcuts. So the behavior of this bug report looks like this:

Wayland windows on Wayland (and I believe X11 windows on X11, but have not verified):
1. Setup keyboard shortcuts "Move window to desktop X", and a panel virtual desktop pager with window outlines.
2. Start dragging a window on desktop 1.
3. Use shortcut to move the window to desktop 2, without releasing the mouse button.
4. Continue moving the window and see it moving in the pager window outline.
5. Use shortcut to move the window back to desktop 1 - the window appears.

XWayland windows on Wayland:
1. Setup keyboard shortcuts "Move window to desktop X", and a panel virtual desktop pager with window outlines.
2. Start dragging a window on desktop 1.
3. Use shortcut to move the window to desktop 2, without releasing the mouse button.
4. Continue moving the window and see it moving in the pager window outline.
5. Use shortcut to move the window back to desktop 1 - the window will not appear.