When the fade effect fades a window out, it sets the opacity to 1.0 and fades it to 0, instead of starting from the current opacity value. Reproducible: Always Steps to Reproduce: 1. Build the "plasma-dialog" branch of kde:colibri. 2. Show a notification. 3. Notice the flashing notification once it has faded out.
I'll rewrite the fade effect to use the new animate syntax and specify w.opacity as animation start/end
I've not seen the particular issue, but case Opacity: data.multiplyOpacity(interpolated(*anim)); break; have doubts that setting the opacity to any value <=1 could increase the effective one (by that effect) For that reason using w.opacity would be wrong. The effect opacity operates multiplicative on the window opacity anyway (just tested, lowered opacity of a window and rand the fade effect on it - there's no visual artifact) @Aurelien You say "Notice the flashing notification once it has faded out" what seems to indicate the window is correctly faded out but then briefly re-appears at full opacity on screen. Is this correct?
some investigation update: colibri fades out itself by using QWidget::setOpacity(). So the window fades out by itself, then turns back to full opacity and is faded out again by the fade effect. I added debug statements in Unmanaged::windowEvent() and see there that at the end of colibri's fade out animation it sometimes turns back to 1, sometimes stays at 0. This is independent of the usage of fade effect.
It seems like Qt is deleting the property which causes void NETWinInfo::event() to reset the value to the default value. Using: diff --git a/kdeui/windowmanagement/netwm.cpp b/kdeui/windowmanagement/netwm.cpp index cf28339..f4b7070 100644 --- a/kdeui/windowmanagement/netwm.cpp +++ b/kdeui/windowmanagement/netwm.cpp @@ -4408,7 +4408,7 @@ void NETWinInfo::update(const unsigned long dirty_props[]) { if (dirty2 & WM2Opacity) { - p->opacity = 0xffffffffU; +// p->opacity = 0xffffffffU; if (XGetWindowProperty(p->display, p->window, net_wm_window_opacity, 0l, MAX_PROP_SIZE, False, XA_CARDINAL, &type_ret, &format_ret, &nitems_ret, &unused, &data_ret) makes the value not being reset any more. The patch cannot be applied in KWindowSystem as that would be wrong. Deleting the property should mean reset to default. I'll try to get confirmation that Qt deletes the property, then I'll change to upstream.
Further investigation showed that XGetWindowProperty failed with a BadRequest error in that case. ReviewRequest posted to no longer reset unconditionally (https://git.reviewboard.kde.org/r/108808/ )
(In reply to comment #2) > @Aurelien > You say "Notice the flashing notification once it has faded out" what seems > to indicate the window is correctly faded out but then briefly re-appears at > full opacity on screen. Is this correct? Yes that is what happens.
Cannot reproduce. Changed modifier key for opacity in Window Behavior to Alt+Mouse Wheel and tested "notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information" command with changing it's opacity by Alt+Mouse Wheel - the notification fades out from current level of opacity 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 OS Type: 64-bit Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz Memory: 7,7 GiB of RAM
Same on Wayland