Created attachment 165255 [details] Demonstration SUMMARY If you delete the last virtual desktop, it remains as a black rectangle when you switch between the last and the first desktop. This doesn't bother you if you switch between desktops using Ctrl + Meta + Left/Right, but it is very annoying if you switch between desktops using the touchpad. STEPS TO REPRODUCE 1. Create 3 desktops. 2. Restart the KWin process or rejoin the session. 3. Delete the last desktop. 4. Try switching between virtual desktops. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Neon Unstable, Wayland KDE Plasma Version: 6.0.80 KDE Frameworks Version: 5.249.0 Qt Version: 6.6.1 ADDITIONAL INFORMATION Attached a video of a demonstration. I recorded the video after restarting KWin.
Can confirm on KDE Neon Testing.
Thanks for the screen recording. Unfortunately I cannot reproduce the issue by following those steps using current git master of Plasma 6 Wayland with Qt 6.6.0 on top of Fedora 39. After you restarted KWin in step 2, Did you quit and re-launch System Settings, or was it already open before you restarted KWin and it stayed open?
After restarting KWin, the settings remained open. I was able to reproduce this bug even outside the settings, creating and deleting desktops via Desktop Grid(In reply to Nate Graham from comment #2) > Thanks for the screen recording. Unfortunately I cannot reproduce the issue > by following those steps using current git master of Plasma 6 Wayland with > Qt 6.6.0 on top of Fedora 39. > > After you restarted KWin in step 2, Did you quit and re-launch System > Settings, or was it already open before you restarted KWin and it stayed > open? After restarting KWin, the settings remained open. I was able to reproduce this bug even outside the settings, creating and deleting desktops via Desktop Grid
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5065
Git commit def3a5055899b1a9000a18060575fefcc7173c1a by Vlad Zahorodnii. Committed on 30/01/2024 at 12:14. Pushed by vladz into branch 'master'. Ignore external updates of _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES At the moment, the desktop layout in _NET_DESKTOP_LAYOUT overwrites new desktop layout with outdated information. This happens because kwin tries to honor the desktop layout set by the pager. However, kwin itself already acts as the pager. The pager applet in plasma doesn't attempt to maintain _NET_DESKTOP_LAYOUT with proper values. On the other hand, kwin trying to both update and also sync its state to _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES has created a series of issues, like lockups or rendering glitches. Given that the window manager can ignore these properties, and the fact that kwin already does act like a pager, this patch makes kwin ignore external updates to _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES. In order to modify the desktop layout on X11, use the dbus api. On Wayland, either the dbus api or the virtual desktop wayland protocol. Related: bug 422319 M +25 -41 autotests/test_virtual_desktops.cpp M +1 -8 src/rootinfo_filter.cpp M +14 -69 src/virtualdesktops.cpp M +1 -5 src/virtualdesktops.h https://invent.kde.org/plasma/kwin/-/commit/def3a5055899b1a9000a18060575fefcc7173c1a
Git commit 0691a973f8f591b3ad41564f3e6bbb21c0ead53a by Vlad Zahorodnii. Committed on 30/01/2024 at 14:54. Pushed by vladz into branch 'Plasma/6.0'. Ignore external updates of _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES At the moment, the desktop layout in _NET_DESKTOP_LAYOUT overwrites new desktop layout with outdated information. This happens because kwin tries to honor the desktop layout set by the pager. However, kwin itself already acts as the pager. The pager applet in plasma doesn't attempt to maintain _NET_DESKTOP_LAYOUT with proper values. On the other hand, kwin trying to both update and also sync its state to _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES has created a series of issues, like lockups or rendering glitches. Given that the window manager can ignore these properties, and the fact that kwin already does act like a pager, this patch makes kwin ignore external updates to _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES. In order to modify the desktop layout on X11, use the dbus api. On Wayland, either the dbus api or the virtual desktop wayland protocol. Related: bug 422319 (cherry picked from commit def3a5055899b1a9000a18060575fefcc7173c1a) M +25 -41 autotests/test_virtual_desktops.cpp M +1 -8 src/rootinfo_filter.cpp M +14 -69 src/virtualdesktops.cpp M +1 -5 src/virtualdesktops.h https://invent.kde.org/plasma/kwin/-/commit/0691a973f8f591b3ad41564f3e6bbb21c0ead53a