Bug 398899 - Blur in menus works only on first call
Summary: Blur in menus works only on first call
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.13.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
: 406905 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-09-21 08:03 UTC by tromzy
Modified: 2019-05-02 18:38 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tromzy 2018-09-21 08:03:47 UTC
On Plasma 5.14 beta, with Breeze Dark window style, the blur effect in application menubar (Konsole, Dolphin, etc.) only applies once :

- open Dolphin (or kate, konsole, etc.)
- open the menubar : the blur effect is applied
- close the menu bar
- reopen it : the blur effect does not apply
- close Dolphin, then reopen it
- open the menubar : blur effect is applied again, but if you close it and reopen it, it is lost again.
Comment 1 Alexander Mentyu 2018-09-21 11:01:01 UTC
Translucency and blur effects are enabled
Intel+NVIDIA video cards
OpenGL 2 compositor
Menus are transparent without blurring after each RMB press only in XWayland windows for me - in Chromium for example

Operating System: KDE neon Developer Edition
KDE Plasma Version: 5.14.80
Qt Version: 5.11.1
KDE Frameworks Version: 5.51.0
Kernel Version: 4.15.0-34-generic
Comment 2 Patrick Silva 2018-09-21 21:10:39 UTC
I can confirm on two computers running different distros (Arch with plasma 5.14 beta and neon dev unstable).
Comment 3 Vlad Zahorodnii 2018-09-22 10:06:52 UTC
Just for tracking:

* The first and the second popup have the same WId;
* Surface::fromQtWinId (at https://phabricator.kde.org/source/kwayland-integration/browse/master/src/windowsystem/windoweffects.cpp$136) returns nullptr for the second popup. Thus, the blur effect doesn't get blur region.
Comment 4 Matej Mrenica 2018-10-03 17:26:34 UTC
I can confirm this, but only on Wayland.
Comment 5 Patrick Silva 2019-03-05 23:12:54 UTC
bug persists on Wayland

Operating System: Arch Linux 
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 6 Patrick Silva 2019-04-26 11:12:16 UTC
*** Bug 406905 has been marked as a duplicate of this bug. ***
Comment 7 David Edmundson 2019-05-02 08:44:47 UTC
Git commit 0a0c3f23fce265f36e5b8fb2b4b8bd311c7c1beb by David Edmundson.
Committed on 02/05/2019 at 08:44.
Pushed by davidedmundson into branch 'master'.

Track surface creation/destruction inside wayland window effects

Summary:
The wayland surface is destroyed and recreated after every hide/show. As
it's a new surface, it needs a new blur attached and applied.

The best hook is the expose event on the window.

The current event filtering in Breeze operates on the QWidget which
doesn't match the window. Fixing there still introduces a second layer
of event filters on another object once the window is known.

Whilst it could be done in breeze, clients should ideally just call
KWindowEffects once per window and forget about it regardless of
the underlying state. It also fixes all other wayland users of the call
at once.

This fixes blur on context menus opened a second time.

Test Plan:
Turned on the show transparency effect in breeze
Opened a context menu multiple times
Observed that it was transparent and blurred

Reviewers: #kwin

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D20951

M  +109  -4    src/windowsystem/windoweffects.cpp
M  +22   -2    src/windowsystem/windoweffects.h

https://commits.kde.org/kwayland-integration/0a0c3f23fce265f36e5b8fb2b4b8bd311c7c1beb