Bug 499109 - On X11 or Wayland focus goes back to previous activity on mouse click when switching activities with different active desktops
Summary: On X11 or Wayland focus goes back to previous activity on mouse click when sw...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Activities in general (show other bugs)
Version: 6.3.3
Platform: Manjaro Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-24 21:43 UTC by Gábor Katona
Modified: 2025-03-24 21:28 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gábor Katona 2025-01-24 21:43:42 UTC
SUMMARY
When I switch activities with hotkey and the active desktop of the activities differ, clicking on a window will result in the focus being on the original activity. Typing will type to the program on the original activity, hovering around will show tooltips from the program on the original activity, etc. The focus can be brought back by clicking on the panel or showing-unshowing he desktop.


STEPS TO REPRODUCE
1. Create to activities (A1 and A2) with two desktops (D1 and D2) on each. Assign hotkeys to the activities 
2. Start a program on A1-D1 and start another at A2-D2
3. Work with program at A2-D2. 
4. Switch to A1 with an assigned hotkey. This will land you at A1-D1, since D1 was the active desktop on A1.
5. Click on the window there. 

OBSERVED RESULT
The window and program on A1-D1 loses focus and e.g. if you type, it will be typed in the program at A2-D2

EXPECTED RESULT
The focus should not go back to A2-D2

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed 20250122
KDE Plasma Version: 6.2.91
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
This breaks the use of activities and can potentially results in data loss if unintended key-presses go to programs on other activity.
Comment 1 Gábor Katona 2025-01-24 21:53:47 UTC
Sorry for first reporting to Activities switcher sidebar. As I have written the report and tested the steps, the component part got clicked unintentionally. Practically a data loss happened.
Comment 2 Gábor Katona 2025-01-27 16:08:11 UTC
In Plasma 6.2.5 and before it was working as expected. I am on X11, if it matters.
Comment 3 TraceyC 2025-01-31 21:43:42 UTC
I can reproduce this on git-master with X11, not on Wayland.

I also noticed that on X11, if I had an unsaved file open on Activity 2 Desktop 2, and chose Log Out:
The UI switched to Desktop 2 but stayed on Activity 1, so the dialog that's holding up the log out is not displayed. It's over on  Activity 2
Comment 4 TraceyC 2025-02-24 17:58:17 UTC
Adding the x11-only keyword
Comment 5 Garth 2025-03-05 19:34:17 UTC
Still occurring on latest KDE 6.3 release, also using X-11.
Comment 6 pdmm 2025-03-22 21:16:44 UTC
I have reproduced this on Manjaro (X11+Wayland) as well as Fedora 41 (Wayland), all Plasma 6.3.3.

OpenSUSE Leap 15.6 on X11 (Plasma 5.27, best I could do) does not show it.

Does anyone have a temporary workaround? I was really enjoying Plasma 6.
Comment 7 Gábor Katona 2025-03-24 21:28:15 UTC
I am now on Wayland because of this bug with X11 and I do not experience it running 6.3.3 with Tumbleweed.