Bug 391819 - The blur effect should work during animations.
Summary: The blur effect should work during animations.
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
: 395494 (view as bug list)
Depends on:
Reported: 2018-03-13 14:43 UTC by tromzy
Modified: 2018-06-25 20:14 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:

Wobbly windows with blur (3.00 MB, video/webm)
2018-03-13 19:06 UTC, Alex Nemeth
Maximize window currently (3.23 MB, video/webm)
2018-03-13 19:07 UTC, Alex Nemeth
Maximize window patched (3.48 MB, video/webm)
2018-03-13 19:09 UTC, Alex Nemeth
Slide back currently (2.88 MB, video/webm)
2018-03-13 19:10 UTC, Alex Nemeth
Slide back patched (3.14 MB, video/webm)
2018-03-13 19:11 UTC, Alex Nemeth
flip_switch (1.55 MB, image/png)
2018-06-25 17:40 UTC, Alex Nemeth

Note You need to log in before you can comment on or make changes to this bug.
Description tromzy 2018-03-13 14:43:20 UTC
I love Kwin's blur effect, especially the new one in Plasma 5.13. The only bad thing is that the blur effect does not work during window animations (supposedly one has a special window decoration that has transparency, so that blur is enabled within the window). For example, with the "Slide back" effect, a transparent window loses its nice blur effect during the whole slide back animation. Same thing for the "Magic lamp" effect. Would it be difficult to modify Kwin so that the blur effect occurs even during animations ?
Comment 1 Martin Flöser 2018-03-13 18:16:22 UTC
It depends. In some animations it might be possible. E.g. for slideback I imagine it could be possible, for magic lamp on the other hand it's probably not possible as the windows are distorted. Also for some animations it is enabled.
Comment 2 Vlad Zahorodnii 2018-03-13 18:36:21 UTC
As far as I remember, effects like Blur or Background contrast tend to do nothing for transformed windows. Unless some special roles are set.

So, with Magic Lamp it is expected to not have blur behind transformed windows. I think forcing blur for Magic Lamp would produce really bad results.

Yet, forcing blur for Slide back could be ok. I think it's doing only translation and scaling.
Comment 3 Vlad Zahorodnii 2018-03-13 18:38:49 UTC
Oh, Martin already answered. :D
Comment 4 Martin Flöser 2018-03-13 18:40:59 UTC
(In reply to Vlad Zagorodniy from comment #3)
> Oh, Martin already answered. :D

and we are consistent in the answer :-)
Comment 5 Vlad Zahorodnii 2018-03-13 18:51:37 UTC
In addition to the blur and slide back effect, it seems like maximize effect has also the same problem.
Comment 6 Vlad Zahorodnii 2018-03-13 18:54:01 UTC
*In addition to the magic lamp and slide back effect
Comment 7 Alex Nemeth 2018-03-13 19:04:52 UTC
The problem is that the blur works with rectangular regions only, transformed windows won't work properly.
I'll upload a few videos as attachments that demonstrate this.
For maximize and slide back it can be done (see attachments) with a simple fix, but this would also enable blur for wobbly windows and magic lamp, I don't know how to differentiate between these animation types.
Comment 8 Alex Nemeth 2018-03-13 19:06:06 UTC
Created attachment 111378 [details]
Wobbly windows with blur
Comment 9 Alex Nemeth 2018-03-13 19:07:45 UTC
Created attachment 111380 [details]
Maximize window currently
Comment 10 Alex Nemeth 2018-03-13 19:09:17 UTC
Created attachment 111381 [details]
Maximize window patched
Comment 11 Alex Nemeth 2018-03-13 19:10:27 UTC
Created attachment 111382 [details]
Slide back currently
Comment 12 Alex Nemeth 2018-03-13 19:11:41 UTC
Created attachment 111383 [details]
Slide back patched
Comment 13 Alex Nemeth 2018-03-13 19:12:52 UTC
As you can see, as long as the blur area is rectangular then it's not a problem, and can be easily patched.
Comment 14 tromzy 2018-03-14 08:37:47 UTC
Thanks for all the answers, and the patches ! Yeah I disabled wobbly windows (one of my favorites effects) because of the lack of blur during moving windows. And it is true that the problem occurs in the Maximized efffect too. I think it's really cool if some of the effects can already be patched (slide back and maximized). For now I can't think of any other effect that needs blurring.
Comment 15 Alex Nemeth 2018-05-31 12:44:40 UTC
This has been fixed for animations and effects that do not modify the shape of the window:
 - Slideback: https://phabricator.kde.org/D12625
 - Maximize: https://phabricator.kde.org/D12623
 - Desktop grid: https://phabricator.kde.org/D12620
 - Present windows: https://phabricator.kde.org/D12619
Comment 16 tromzy 2018-06-02 08:28:58 UTC
I can confirm on Plasma 
 beta !
Comment 17 tromzy 2018-06-02 08:29:29 UTC
Plasma 5.13 beta
Comment 18 Alex Nemeth 2018-06-02 11:54:59 UTC
(In reply to tromzy from comment #16)
> I can confirm on Plasma 
>  beta !

By this you mean that you confirm that it is fixed, right?
Comment 19 tromzy 2018-06-04 07:23:45 UTC
Yes, I can confirm it is fixed on Plasma 5.13 beta.
Comment 20 Vlad Zahorodnii 2018-06-16 15:38:27 UTC
*** Bug 395494 has been marked as a duplicate of this bug. ***
Comment 21 tromzy 2018-06-25 10:45:33 UTC
I noticed an animation where the blur effect can be added : 

When alt-tabbing between applications, there are several animation effects to chose from, the first one (which is "défilement circulaire" in french, I don't know in english) could be tweaked to add blur effect.
Comment 22 Alex Nemeth 2018-06-25 17:40:36 UTC
Created attachment 113562 [details]

I assume you mean "flip switch".
This is a bit more difficult since the window shape is not really rectangular.
I currently have no intention to implement non-rectangular blur areas.
Comment 23 tromzy 2018-06-25 19:35:16 UTC
I'm talking about this effect : https://i.imgur.com/0EQYf0n.png

It is not rectangular ?
Comment 24 Alex Nemeth 2018-06-25 20:14:17 UTC
(In reply to tromzy from comment #23)
> I'm talking about this effect : https://i.imgur.com/0EQYf0n.png
> It is not rectangular ?

If the window is in the middle then it is rectangular, but if the blurred window would be on the left or right side then it wouldn't be, and not to speak of the reflections under the windows...
Having only the middle window blurred would be annoying too.
We can only hope someone with a brave soul will implement it.