Bug 457486 - Windows opened in multiple desktops have wrong z-positioning when switching between desktops
Summary: Windows opened in multiple desktops have wrong z-positioning when switching b...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.25.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-08-04 15:23 UTC by Komorebi
Modified: 2022-09-23 22:56 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Komorebi 2022-08-04 15:23:08 UTC
Affected effects are:  desktop grid, slide (switch desktop) and present windows.
This bug is a 5.25 regression.

STEPS TO REPRODUCE
1.  Make kwin rule "force window appear on all desktops"
2.  Try to switch desktops or use swipe gesture to activate one of the effects affected

OBSERVED RESULT
In most cases window that is assigned to all desktops are painted on top, even if it's not active

EXPECTED RESULT
These windows should behave as any other window

Here's the video demonstrating the issue:
https://drive.google.com/file/d/1zBCaWDVhz48RSOoVooholAeHnj-LfmNn/view?usp=sharing
On desktop 4 Spotify (which is an all-desktops window) is painted on top of the Chrome, but Chrome is treated as active by the effects and also by the panel (which is correct). Also the window overflows slide effect.
Comment 1 Komorebi 2022-08-04 15:26:35 UTC
Operating System: KDE neon 5.25
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.15.0-43-generic (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800HS with Radeon Graphics
Memory: 22,9 GiB of RAM
Graphics Processor: AMD RENOIR
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ROG Zephyrus G14 GA401QE_GA401QE
System Version: 1.0
Comment 2 Nate Graham 2022-08-05 15:00:08 UTC
Can reproduce with the swipe effect; the issue is already fixed in current git master for Present Windows and Desktop Grid. But for the Swipe effect, the windows that are pinned to all desktops get raised to the top during the swipe. Then they go back to their correct Z order after the swipe is finished.
Comment 3 Eric Edlund 2022-08-06 12:51:43 UTC
It appears that windows on all desktops are being painted multiple times. There are two possible fixes:

1) Draw the window on each desktop and make it move with the slide

2) Draw the window stationary and make it look like it's moving between desktops

This same bug effects notifications, should those be treated differently?
Comment 4 Nate Graham 2022-08-07 18:41:29 UTC
Notifications are always supposed to appear above all windows, so I don't think it's a bug there. But we should fix windows.
Comment 5 Bug Janitor Service 2022-08-07 20:15:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2787
Comment 6 Komorebi 2022-09-07 06:38:29 UTC
>the issue is already fixed in current git master for Present Windows and Desktop Grid
still present in 5.25.5
Comment 7 Vlad Zahorodnii 2022-09-19 07:00:56 UTC
Git commit 6d9f740d6f02c7d8b8005edc3573c76b8f8f3cc3 by Vlad Zahorodnii, on behalf of Eric Edlund.
Committed on 19/09/2022 at 07:00.
Pushed by vladz into branch 'master'.

Better handle windows on all desktops in slide effect

Change the render cycle for slide effect. Now, windows will be drawn on each desktop or not in the paintWindow() loop instead of the paintScreen() loop. This allows us to respect stacking order better by painting all of the same window together instead of per VD.
Related: bug 458622

M  +75   -86   src/effects/slide/slide.cpp
M  +4    -8    src/effects/slide/slide.h

https://invent.kde.org/plasma/kwin/commit/6d9f740d6f02c7d8b8005edc3573c76b8f8f3cc3
Comment 8 Vlad Zahorodnii 2022-09-19 07:03:17 UTC
Git commit 5ccb8f8d20933d89065708b83f9e62ff01d2e50a by Vlad Zahorodnii, on behalf of Eric Edlund.
Committed on 19/09/2022 at 07:03.
Pushed by vladz into branch 'Plasma/5.26'.

Better handle windows on all desktops in slide effect

Change the render cycle for slide effect. Now, windows will be drawn on each desktop or not in the paintWindow() loop instead of the paintScreen() loop. This allows us to respect stacking order better by painting all of the same window together instead of per VD.
Related: bug 458622


(cherry picked from commit 6d9f740d6f02c7d8b8005edc3573c76b8f8f3cc3)

M  +75   -86   src/effects/slide/slide.cpp
M  +4    -8    src/effects/slide/slide.h

https://invent.kde.org/plasma/kwin/commit/5ccb8f8d20933d89065708b83f9e62ff01d2e50a