Commit 8231e233 authored by Sebastian Kügler's avatar Sebastian Kügler Committed by Daniel Vrátil
Browse files

Fix for both, X11 and wayland

We can only animate the opacity on X11, as QtWayland's platformwindow
doesn't support this. Avoids warnings.
parent c8c9851b
......@@ -104,9 +104,9 @@ void Osd::showOsd()
auto *rootObject = m_osdObject->rootObject();
// if our OSD understands animating the opacity, do it;
// otherwise just show it to not break existing lnf packages
if (rootObject->property("animateOpacity").isValid()) {
// only animate on X11, wayland plugin doesn't support this and
// pukes loads of warnings into our logs
if (qGuiApp->platformName() == QStringLiteral("xcb")) {
rootObject->setProperty("animateOpacity", false);
rootObject->setProperty("opacity", 1);
rootObject->setProperty("visible", true);
......@@ -31,13 +31,23 @@ PlasmaCore.Dialog {
// Icon name to display
property string icon
property string outputName
property string modeName
property bool animateOpacity: false
property string itemSource
property string outputName
property string modeName
Behavior on opacity {
SequentialAnimation {
// prevent press and hold from flickering
PauseAnimation { duration: root.timeout * 0.8 }
NumberAnimation {
duration: root.timeout * 0.2
easing.type: Easing.InQuad
enabled: root.animateOpacity
mainItem: Loader {
source: itemSource
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment