Bug 496251

Summary: "Switch desktop on edge" doesn't work in specific condition(s)
Product: [Plasma] kwin Reporter: kdebuggy <3809940and>
Component: Hotcorners and edgesAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: minor    
Priority: NOR    
Version First Reported In: 6.1.5   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description kdebuggy 2024-11-14 04:52:21 UTC
SUMMARY
I have virtual desktops enabled. Also "Switch desktop on edge" option is enabled. So I can move to adjacent virtual desktops just by moving my cursor there. After upgrading to KDE 6.1.5 (that is shipped with Kubuntu 24.10) I started having problems switching between the virtual desktops.

STEPS TO REPRODUCE
Currently I only have evidence for mpv player. It happened with other application(s) if I am remembering correctly, but I didn't note them. I will update the issue if I encounter them again.

1. Open a movie file with mpv media player
2. Resize the window
3. Try to move the cursor to the screen edge to switch desktop

This is a semi reliable way to trigger this issue. Still it doesn't happen every time when I follow these exact steps with the same file. That's why it is hard to observe this problem. Resizing is the trigger in this situation (but as I said it is not triggering every time).

OBSERVED RESULT
In the case above, window manager basically acts like this option is disabled: "Switch desktop on edge"
Mouse cursor stops at the edge and doesn't switch to the next virtual desktop.

Sometimes it goes back to normal when I close this mpv player window. Sometimes it stays stuck.
As a solution, I open a new Dolphin or Konsole window. This fixes the problem and it starts switching desktops again.

EXPECTED RESULT
Cursor should continue to the next virtual desktop.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 24.10 / X11
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0 
Qt Version: 6.6.2

ADDITIONAL INFORMATION
Applications like Firefox, Kate, Libreoffice, GIMP all work properly despite different windowing toolkits. Considering the specific conditions for the problem and probably low number of users affected, this looks like a pretty minor problem to me. I am reporting this to provide more information in the case that a similar problem is reported.
Comment 1 kdebuggy 2024-11-14 16:21:23 UTC
UPDATE:
I determined that I can consistently trigger the problem with these steps:
1. Open any window (including Dolphin, Konsole, Firefox etc.)
2. Move the window to another virtual desktop with mouse

After it is stuck, I can't move between the desktops with my mouse BUT I can move between them while carrying a window with mouse.
Opening a new Dolphin or Konsole window fixes the problem (temporarily) as I wrote before.

I guess this increases the severity of this bug, since all applications are affected apparently.
Comment 2 kdebuggy 2025-05-14 09:26:07 UTC
RESOLVED:

Problem disappeared after upgrading to Kubuntu 25.04 with the current system info given below:

Linux/KDE Plasma: Kubuntu 25.04 / X11
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0 
Qt Version: 6.8.3
Comment 3 kdebuggy 2025-05-31 22:49:37 UTC
Well apparently I was quick to declare the problem as SOLVED.
Because now (after 25.04 update) it works properly for a while after a system reboot.
Then the "stuck workspace after resizing a window" bug reappears.

Some extra clues which might be helpful:
- Problem occurs only when resizing a window with the mouse, so maybe problem is cursor/window decoration interaction code
- When I resize a window via wmctrl, there is no problem (I am using a self written scripts system as a workaround now)
- Also using wmctrl on a window in the stuck state releases the lock/hold so I can change workspace with mouse again (until I resize another window of course)