Bug 460382 - Blurred windows get transparent when using gestures / when sliding between virtual desktops
Summary: Blurred windows get transparent when using gestures / when sliding between vi...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: git-stable-Plasma/5.26
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-10-13 17:07 UTC by Andrej Halveland
Modified: 2022-10-23 20:47 UTC (History)
1 user (show)

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


Attachments
Screenshot 1 (456.01 KB, image/png)
2022-10-13 17:07 UTC, Andrej Halveland
Details
Screenshot 2 (715.24 KB, image/png)
2022-10-13 17:07 UTC, Andrej Halveland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Halveland 2022-10-13 17:07:29 UTC
Created attachment 152780 [details]
Screenshot 1

When the blur effects are enabled and you use the three-finger swipe to smoothly slide into the next virtual desktop you can see that the blur effect also somehow slides, which results in the blur to become transparent.
This is not limited to the three-finger swipe action though... If you set the animation to be really slow and change your desktop by using the Pager you can also see it.

STEPS TO REPRODUCE
1.  Create multiple desktops/workspaces
2.  Use the "Slide" desktop effect
3.  Switch between virtual desktops

OBSERVED RESULT
Blur disappears/reappears as the transition from one desktop to another happens.

EXPECTED RESULT
Blur should not become transparent.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 6.0.1-arch1-1
Graphics Platform: Wayland and X11
Processors: AMD Ryzen 9 4900HS 8-Core Processor
Memory:  16GB of RAM
Graphics Processor: Integrated: Vega 8     Dedicated: NVIDIA GeForce RTX 2060 Max-Q
Manufacturer: ASUS (Zephyrus G15 GA502IV)

ADDITIONAL INFORMATION
This is also happens when using any of the gestures on Wayland (all windows with blur become transparent, see screenshots).
Comment 1 Andrej Halveland 2022-10-13 17:07:55 UTC
Created attachment 152781 [details]
Screenshot 2
Comment 2 Bug Janitor Service 2022-10-13 19:40:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3048
Comment 3 Andrej Halveland 2022-10-14 07:20:10 UTC
>I saw 5.26.0 and thought we might have broken it, but it was probably broken for a while already
Yes, I should've mentioned that too...

When applying this patch to the Plasma/5.26 branch it does fix the sliding blur on windows, but does not fix it on the  Application Bar/Default Panel (I forgot to mention to enable "Slide docks" in Virtual Desktop settings). But then I also noticed when I compiled KWin with the "work/zzag/slide-effect-blur" branch (with some janky hack to make it compile with Plasma 5.26 and Wayland 1.20, idk if it broke something) the "Slide Docks" feature disappeared from the settings? Is it because I am using stable Plasma 5.26 with the "way too new" KWin?
Comment 4 Vlad Zahorodnii 2022-10-14 07:28:23 UTC
"Slide docks" option has been removed in git master.
Comment 5 Vlad Zahorodnii 2022-10-14 07:51:13 UTC
Git commit f2df2aa0e16e7ce70b9dc75d992d2f7aed35b324 by Vlad Zahorodnii.
Committed on 14/10/2022 at 07:17.
Pushed by vladz into branch 'master'.

effects/blur: Fix clipping when sliding virtual desktops

When the slide effect paints a virtual desktop, it translates both
windows and the clip region.

Since the clip region slides too, the blur effect needs to be careful.

At the moment, the blur effect computes the blur region as follows:

- get the value of the blur region hint from client, map it to the
  global coordinate space, and intersect it with the clip region
- apply translation and scale to the blur region
- pass the blur region to doBlur()

However, the translation transform must be applied before intersecting
the blur region with the clip region.

M  +3    -3    src/effects/blur/blur.cpp

https://invent.kde.org/plasma/kwin/commit/f2df2aa0e16e7ce70b9dc75d992d2f7aed35b324
Comment 6 Vlad Zahorodnii 2022-10-23 20:47:43 UTC
Git commit 7802d25b642f45156b7aafc278d11b2066c190f4 by Vlad Zahorodnii.
Committed on 23/10/2022 at 20:47.
Pushed by vladz into branch 'Plasma/5.26'.

effects/blur: Fix clipping when sliding virtual desktops

When the slide effect paints a virtual desktop, it translates both
windows and the clip region.

Since the clip region slides too, the blur effect needs to be careful.

At the moment, the blur effect computes the blur region as follows:

- get the value of the blur region hint from client, map it to the
  global coordinate space, and intersect it with the clip region
- apply translation and scale to the blur region
- pass the blur region to doBlur()

However, the translation transform must be applied before intersecting
the blur region with the clip region.


(cherry picked from commit f2df2aa0e16e7ce70b9dc75d992d2f7aed35b324)

M  +3    -3    src/effects/blur/blur.cpp

https://invent.kde.org/plasma/kwin/commit/7802d25b642f45156b7aafc278d11b2066c190f4