SUMMARY With multiple virtual desktops, when a window on another activity wants attention, the task manager shows the wants-attention window on even if it is set to only show windows from the current activity (this is fine), but when clicking on it the taskbar opens the correct activity but not the correct virtual desktop - so we get to the new activity and don't see the attention seeking window, so we have to click the task manager entry again. STEPS TO REPRODUCE 1. Set up two or more virtual desktops 2. Set up two or more activities 3. Set the task manager to "show only tasks" "from current activity" 4. In one activity start an application and set it up to demand attention in a few seconds - for example: launch Konsole and run "sleep 10; echo $'\a'" in it - by default Konsole is configured to demand attention when it gets a BELL in standard output. 5. Switch to another virtual desktop then immediately switch to a second activity. Wait for the application to demand attention. OBSERVED RESULT A task manager entry for Konsole would appear and demand attention. Clicking on it would change activity but to the last virtual desktop on the first activity - where there is no Konsole window. Clicking the Konsole task manager entry again will take you to the correct virtual desktop. EXPECTED RESULT Clicking the task manager entry demanding attention should take the user to where that window is - by switching to the window's activity, switching to the window's virtual desktop and raising the window. Currently it only does one of the first two. SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.20.80 (but also observed in 5.19.90 and possibly earlier) KDE Frameworks Version: 5.76.0 Qt Version: 5.15.0
Created attachment 132292 [details] Screencast showing the problem This screencast is showing the behavior with Eclipse demanding attention. As can be seen, the task manager entry remains demanding attention after clicking once (and switching activity). In my tests with Konsole it doesn't work that way - after the first click the task manager entry loses the attention flag and if you have multiple windows on the destination activity - it might be difficult to find the correct window that demanded attention.
This is caused because kactivitymanagerd remembers and sets the virtual desktop on activity switch. When kwin switches activity to go to the active window, the daemon then sets the desktop to the last recorded from that activity. To fix this, we need to move this functionality into kwin.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kactivitymanagerd/-/merge_requests/33
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3011
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5871
Git commit 7408d8f9c8cc4aae88bd4e844cc2ee221af00b6a by Xaver Hugl. Committed on 03/12/2024 at 20:16. Pushed by zamundaaa into branch 'master'. activities: don't remember virtual desktops when intentionally switching to a different one M +1 -1 src/activation.cpp M +4 -1 src/activities.cpp M +5 -1 src/activities.h M +1 -1 src/scripting/workspace_wrapper.cpp https://invent.kde.org/plasma/kwin/-/commit/7408d8f9c8cc4aae88bd4e844cc2ee221af00b6a
*** Bug 498087 has been marked as a duplicate of this bug. ***