Bug 502022 - Application window still visible after changing activity
Summary: Application window still visible after changing activity
Status: RESOLVED DUPLICATE of bug 501393
Alias: None
Product: kwin
Classification: Plasma
Component: activities (other bugs)
Version First Reported In: 6.3.3
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-26 14:04 UTC by Maciej Sitarz
Modified: 2025-07-19 13:22 UTC (History)
6 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 Maciej Sitarz 2025-03-26 14:04:53 UTC
SUMMARY
I have some applications sometimes do not "stay" on the assigned Activity.
When switching to the next Activity (using a keyboard shortcut), the window with focus is still visible in the Activity I switched to (the application does not have this Activity selected in "Show in Activity")

STEPS TO REPRODUCE
1. Setup two activities: "Work"  and "Fun"
2. Change to Activity "Work"
3. Start Firefox and assign it to only "Show in Activities: Work"
4. Change to Activity "Fun"

OBSERVED RESULT
Firefox window is still visible after switching to "Fun" Activity.
When the issue occurs I can open the context menu on windows title bar. Hover over "Show in Activities" (to see the selected values) and close the context menu (do not change anything, just open it and close)
After that the Firefox window disappears from the Activity (and can be found in it's Activity -> "Fun")

EXPECTED RESULT
Firefox window should not be visible after switching to "Fun" Activity.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.8-200.fc41.x86_64 (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-10750H CPU @ 2.60GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Quadro T1000

ADDITIONAL INFORMATION
- This issue started occurring after some upgrade, but I can't say from which exact version
- The issue is reproducible most of the time with Firefox, Chrome and krusader. When this occurs I tried the same scenario with konsole, but it works properly.
- The issue seems a bit random, sometimes it works and I can't reproduce, sometimes it occurs on every Activity switch
- When a window from a different Activity is displayed the Icons-and-Text Task Manager does not show it
- Icons-and-Text Task Manager Settings: Behavior > Show only tasks:
From current desktop: enabled
From current activity: enabled
- Widget "Show Activity Manager" does not seem to work, selecting an Activity there causes a quick switch to it, but then it goes back to the previous one

During Activity switching user journalctl shows this log entry:
```
kwin_x11[9044]: kwin_core: Failed to focus 0x1200011 (error 8)
```
Comment 1 TraceyC 2025-06-25 16:52:03 UTC
*** Bug 505910 has been marked as a duplicate of this bug. ***
Comment 2 TraceyC 2025-06-25 16:52:57 UTC
From the duplicate report:

================================================
> I tried some time ago with a new user and I experienced the same problem. I also have some applications that are explicitly set to show only in one activity, but they still show in other activities when I experience the bug that I described.
================================================
Comment 3 TraceyC 2025-06-25 16:53:20 UTC
I'm not able to replicate this bug on git-master, following the replication steps from the duplicate.
I also can't reproduce on Fedora 42
Comment 4 Kevin Krammer 2025-06-30 11:45:11 UTC
I get his now as well after the update to 6.4.1 (KDE Neon).
An almost similar system is still on 6.4.0 and there it still works.

Worse than the original report it seem KWin has "lost" the concept of activities because the "Show in activities" sub menu of the window menu does no longer show up.
For me it sounds more like https://bugs.kde.org/show_bug.cgi?id=505910 which might not have been a duplicate, just related.

Plasma desktop switches between activities just fine (different wallpaper and applet configs).
Comment 5 Kevin Krammer 2025-07-07 08:33:48 UTC
Small addition to my previous comment: the "Show in activity" menu entry does show up in the context menu of taskbar entries.

While windows themselves show up on all activities, their taskbar entries only do when the respective activity is active.
Comment 6 gosella 2025-07-11 15:44:51 UTC
I can confirm this. I'm using KDE neon 6.4.2 (on X11) and I'm observing the same behavior described in comments #4 and #5.

By default, all windows are set to be shown on all activities after login.

If I them manually set different activities for some windows, they are only hidden/shown in the task bar after changing between activities, but the windows themselves remain visible all the time.

My system info:

Operating System: KDE neon User Edition
KDE Plasma Version: 6.4.2
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.0
Kernel Version: 6.8.0-63-generic (64-bit)
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i7-1185G7 @ 3.00GHz
Memory: 32 GiB of RAM (30.7 GiB usable)
Graphics Processor: Intel® Xe Graphics
Comment 7 gosella 2025-07-17 12:07:13 UTC
Yesterday I upgraded to KDE Plasma 6.4.3 and the issue seems to be fixed.

Activities now behaves as expected.
Comment 8 Alberto 2025-07-17 13:02:24 UTC
From a quick test, I also confirm that the problem seems to be disappeared in Plasma 6.4.3.
Comment 9 TraceyC 2025-07-18 01:43:58 UTC
(In reply to Alberto from comment #8)
> From a quick test, I also confirm that the problem seems to be disappeared
> in Plasma 6.4.3.

That's great news, thanks for letting us know. 

macieksitarz+bugs.kde@gmail.com, are you still seeing this bug or is it also resolved for you on 6.4.3?
Comment 10 Maciej Sitarz 2025-07-18 08:14:57 UTC
I switched to Wayland because this issue did not occur using Wayland. I didn't test X11 since then.
Comment 11 Nate Graham 2025-07-18 13:54:33 UTC
This will end up having been fixed by the fix for Bug 501393.

*** This bug has been marked as a duplicate of bug 501393 ***
Comment 12 Kevin Krammer 2025-07-19 07:36:01 UTC
Works for me with 6.4.3

Windows are created on the current activity only, switching activities hides/shows them accordingly, "Show in activity" is back in the decoration window menu
Comment 13 Nate Graham 2025-07-19 13:22:56 UTC

*** This bug has been marked as a duplicate of bug 501393 ***