Bug 468389 - Foreground/background element drawing mixed up
Summary: Foreground/background element drawing mixed up
Status: RESOLVED DUPLICATE of bug 455429
Alias: None
Product: kwin
Classification: Plasma
Component: activities (show other bugs)
Version: 5.27.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-11 12:32 UTC by Ancoron
Modified: 2023-08-02 10:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Konsole with context menu drawn in background (643.03 KB, image/png)
2023-04-11 12:32 UTC, Ancoron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ancoron 2023-04-11 12:32:31 UTC
Created attachment 158014 [details]
Konsole with context menu drawn in background

SUMMARY

After switching activities, new windows, popups and any other element (application-independent) are often drawn behind their parents as well as other (inactive) windows.

STEPS TO REPRODUCE
1. have compositor enabled
2. create 2 or more activities
3. open some applications in each activity
4. switch activities back and forth
5. switch active window
6. open application menu or other popup

OBSERVED RESULT
1. Like in the attached screenshot, popups are often drawn behind their patent window, but are still in mouse-focus, so invoking actions is working (even in blind mode for non-transparent windows).
2. The active window is not always drawn in front of others (no window preferences), which also includes the shadow and active titlebar coloring

EXPECTED RESULT
1. Popups/menus/... are always drawn in front of any other window
2. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux (kernel 6.2.10-arch1-1)
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
A workaround is to disable and re-enable compositing after switching activities (by default via ALT+SHIFT+F12).
Comment 1 Nate Graham 2023-04-11 17:41:02 UTC
Are you on X11 or Wayland?

Do you have any non-default KWin effects or scripts active?

Are you using any Window rules?

Does the issue still happen with only one Activity?
Comment 2 Ancoron 2023-04-12 07:32:26 UTC
I am using X11, no 3rd party effects.

The only custom KWin script I have is Mudeer for window positions/tiling: https://github.com/darkstego/Mudeer

I have also tested without.

With only one Activity, everything is as it should be, no issues here (running the same setup on a different machine).

However, I just created another user and tried to reproduce it and I wasn't able to so far (including Mudeer as well).

As this machine is set up from scratch just recently it can't be some leftover, however, before using Mudeer, I tested out https://github.com/Bismuth-Forge/bismuth and https://github.com/esjeon/krohnkite but didn't actually like it.

Could it be some leftover from those that's colliding?

Is there a way to reset only parts of the plasma/kwin configuration, so that I don't have to start all over again or is there some backup/restore mechanism (even low-level)?
Comment 3 Ancoron 2023-08-01 18:06:10 UTC
I was now able to reproduce the issue with a completely new user setup and indeed, it appears to be happening only for setups with multiple Activities, but not necessarily only after Activity switching (just takes longer to get triggered).

Also, this new user setup did not have any custom KWin scripts installed, which could have messed with it.

The issue does not occur when compositor is turned off, so it had to do with either the compositor itself or some of the desktop effects, which I then tested thoroughly.

Finally, I found that the effect "Slide Back" in section "Focus" is causing this bug.

After disabling the effect, the originally affected user session immediately became free of this issue. Although I'll observe it further, it looks like I have found at least one candidate here.

Also, I am still running the Mudeer Tiling KWin script without any issue.
Comment 4 Zamundaaa 2023-08-02 10:55:54 UTC

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