Bug 425139 - Enabling blur effect does not cause non-qt windows to blur, even when they have semi-transparent elements
Summary: Enabling blur effect does not cause non-qt windows to blur, even when they ha...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: platform-wayland-nested (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-08 13:42 UTC by sk.griffinix
Modified: 2020-09-02 07:31 UTC (History)
2 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 sk.griffinix 2020-08-08 13:42:14 UTC
SUMMARY
Enabling blur effect does not cause non-qt windows to blur, even when they have semi-transparent elements

STEPS TO REPRODUCE
1. Log in to plasma wayland session
2. Enable blur effect from System settings>Desktop Effects>blur
3. Apply a gtk theme with transparent elements such as Arc (https://github.com/jnsh/arc-theme) or Fantasma (https://www.gnome-look.org/p/1312446/) or custom Firefox css.  

OBSERVED RESULT
The transparent regions in non-qt applications are not blurred

EXPECTED RESULT
All windows with transparent elements should be blurred

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I am aware that this was not implemented in X, but there were workarounds to make any window blurred. I could not find any such way in wayland, hence it is in a way a regression. However, it is very much possible since a wayland compositor named wayfire (https://github.com/WayfireWM/wayfire) already has a working implementation to blur every window
Comment 1 David Edmundson 2020-08-09 09:12:50 UTC
It would be problematic for us to blur all transparent areas of a window by default.
Comment 2 sk.griffinix 2020-08-09 09:57:12 UTC
(In reply to David Edmundson from comment #1)
> It would be problematic for us to blur all transparent areas of a window by
> default.

Why? It is already done for qt qpplications
Comment 3 David Edmundson 2020-08-09 10:04:05 UTC
>It is already done for qt applications

No it isn't. The application itself requests a blur region.
Comment 4 sk.griffinix 2020-08-09 11:28:32 UTC
(In reply to David Edmundson from comment #3)
> >It is already done for qt applications
> 
> No it isn't. The application itself requests a blur region.

Can't we enable an option in blur effect itself to force blur on all apps? If compositors can wayfire can do it, it must not be impossible in plasma.

Also is there an example of an app that has transparency but not request blur?
Comment 5 Christoph Feck 2020-08-26 22:06:38 UTC
> Also is there an example of an app that has transparency but not request blur?
Windows which are "shaped" (i.e. are not rectangular) use transparency, but do not need blur.

You would need to detect full transparency vs. partial transparency. If you can come up with a plan how to do this without checking the alpha component of each pixel, please share. The better option is of course to announce if blur is needed, and (even better) at which region.
Comment 6 sk.griffinix 2020-09-02 07:31:55 UTC
> You would need to detect full transparency vs. partial transparency. If you
> can come up with a plan how to do this without checking the alpha component
> of each pixel, please share. The better option is of course to announce if
> blur is needed, and (even better) at which region.

I am sorry but I am not a programmer and the only exposure I had to programming was java in high school, so my queries and and requests must be irritating. I tried checking the wayfire implementation (https://github.com/WayfireWM/wayfire/tree/master/plugins/blur) and I accept I can't make any sense out of it. I would assume they are checking for every region with opacity < 1 and blurring it?
In my use, I do think they are doing something like that. It seems to blur every region with opacity<1, even shadows. Maybe something like that is not feasible with kwin as you say. But is there any method possible to make specific windows transparent in wayland with kwin? I have done that with xdotools and devilspie in x.org, but I don't think something comparable exists or can exist in wayland. I used the above methods to blur gtk applications and yakuake