Bug 372622

Summary: Wayland-specific window flash during fade at window close
Product: [Plasma] kwin Reporter: Eike Hein <hein>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: bugseforuns, tromzy
Priority: NOR Flags: hein: Wayland+
Version First Reported In: git master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Eike Hein 2016-11-18 11:19:59 UTC
When I close an application main window (e.g. Konversation or Dolphin, using the Wayland platform) by keyboard shortcut (Ctrl+Q) on kwin_wayland with default effects settings, the window briefly flashes back to full opacity during its fade-out animation. I haven't observed this on kwin_x11.
Comment 1 Martin Flöser 2016-11-18 12:22:31 UTC
we might have multiple problems here. For one I see that the fade out animation doesn't run when closing the menu. It runs for the closed menu only when application quits.
Comment 2 Eike Hein 2016-11-18 12:26:39 UTC
I'm seeing various animation state / flasing problems on Wayland, this is the first one I could clearly isolate/describe. They might all have the same root cause or not.
Comment 3 Martin Flöser 2016-11-18 15:42:53 UTC
For the popup menus and hopefully also the flicker in general: https://phabricator.kde.org/D3419
Comment 4 Martin Flöser 2016-11-22 06:18:43 UTC
Git commit 451bbb54ddf864f80142f36a9d5d54f57e434f1c by Martin Gräßlin.
Committed on 22/11/2016 at 06:18.
Pushed by graesslin into branch 'master'.

[effects] Handle windowShown and windowHidden in fade effect

Summary:
For Wayland windows we can have a sequence of window unmapped
(windowHidden signal) followed by a windowClosed way later when the
application quits. This is for example the case with menus.

The result of this was that the fade out animation triggered when the
application quit showing all the already closed menus again.

This change implements a windowShown and windowHidden handler and
triggers the fadeIn/Out animation on it. If the window gets shown
again the existing fadeOut animation gets cancelled, so that it can run
again.

If a window gets closed for which a fade out animation has been run
already, it's not triggered again, thus ensuring that we don't see
zombie windows.

Reviewers: #kwin, #plasma_on_wayland, hein

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

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

M  +1    -0    autotests/integration/effects/CMakeLists.txt
A  +182  -0    autotests/integration/effects/fade_test.cpp     [License: GPL (v2)]
M  +16   -4    effects/fade/package/contents/code/main.js

http://commits.kde.org/kwin/451bbb54ddf864f80142f36a9d5d54f57e434f1c
Comment 5 Patrick Silva 2017-01-29 18:22:13 UTC
This is still happening on plasma-wayland-devedition-gitunstable-20170128-2117-amd64

It happens when I close Dolphin and System Settings, for example.
Comment 6 Martin Flöser 2017-03-02 19:20:06 UTC
*** Bug 377102 has been marked as a duplicate of this bug. ***
Comment 7 Martin Flöser 2017-12-29 21:05:54 UTC
I haven't seen this issue for a long time. If you are still able to reproduce with Plasma 5.12 please reopen.