Bug 435745

Summary: Wayland: new application windows are created in "all activities" instead of current activity
Product: [Plasma] kwin Reporter: Oded Arbel <oded>
Component: activitiesAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: goo, horen, nate, p.r.worrall
Priority: NOR Flags: goo: Wayland+
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.22.2

Description Oded Arbel 2021-04-14 23:08:19 UTC
SUMMARY
In KWin Wayland, when a new application window is created, its activities are set to "all activities" unlike in X11 where a new window is by default set to only the current activity.

STEPS TO REPRODUCE
1. Set up 2 or more activities.
2. Start a new application, for example Dolphin.
3. Check the window operation menu, "Show in Activities" sub menu.

OBSERVED RESULT
"All activities" is selected.

EXPECTED RESULT
Only the current activity should be selected, like in X11.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.21.80
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Comment 1 Oded Arbel 2021-04-21 08:02:06 UTC
I went back to X11 due to various problems with activities, and now I see that in kwin_x11 also all new application windows are created in "all activities".

After further investigation, it seems that the culprit is a window rule that I have set up for Yakuake to show on all activities and always on top - for some reason it was applying to all new windows. This is very likely a mistake on my part - I will have to do more investigation and report back.
Comment 2 Oded Arbel 2021-05-13 19:41:00 UTC
This is indeed an issue in my setup, without any window rule that enables this behavior.

With the same set of Window rules, in X11 new application windows are set to appear only on the activity that was active when they were created, while in wayland new application windows have "show in activities" set to "all activities".
Comment 3 horen@mac.com 2021-05-17 23:04:09 UTC
Without any additional rules. In KDE wayland any application, konsole, kmail etc is replicated in all activities. Logging out and back with X11 the behavior in activities is correct.
Comment 4 goo 2021-06-17 03:24:30 UTC
Still an issue in Plasma Wayland 5.22.1. When a new application is started it is added to all activities instead of to the current one only.

This is a big issue that breaks activities workflow.
Comment 5 Bug Janitor Service 2021-06-20 15:11:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1119
Comment 6 Zamundaaa 2021-06-20 22:09:34 UTC
Git commit 0f6495f4b2a7633c7ed5fa47791bc9174c4f0f4d by Xaver Hugl.
Committed on 20/06/2021 at 18:37.
Pushed by zamundaaa into branch 'master'.

XdgSurfaceClient: set to current activity and desktop in constructors
FIXED-IN: 5.22.2

M  +16   -0    src/xdgshellclient.cpp

https://invent.kde.org/plasma/kwin/commit/0f6495f4b2a7633c7ed5fa47791bc9174c4f0f4d
Comment 7 Zamundaaa 2021-06-20 22:10:08 UTC
Git commit a2962635bec6c6416e2dc754ec7d727a6b6db7bb by Xaver Hugl.
Committed on 20/06/2021 at 22:10.
Pushed by zamundaaa into branch 'Plasma/5.22'.

XdgSurfaceClient: set to current activity and desktop in constructors
FIXED-IN: 5.22.2


(cherry picked from commit 0f6495f4b2a7633c7ed5fa47791bc9174c4f0f4d)

M  +16   -0    src/xdgshellclient.cpp

https://invent.kde.org/plasma/kwin/commit/a2962635bec6c6416e2dc754ec7d727a6b6db7bb