Commit 8b6fef45 authored by Martin Flöser's avatar Martin Flöser

[wayland] Export themed icon name to PlasmaWindow interface

If the icon doesn't have a name, we pass the generic xorg icon. Most
likely our xwayland clients won't have a theme name, so giving them
the xorg icon seems a good enough work around. If we would want to
pass the real icon for xwayland clients we would need a way to
serialize them which seems like quite some needless overhead for legacy
applications. Can be considered for the future nevertheless.
parent 31e599a6
......@@ -227,6 +227,7 @@ void WaylandServer::announceClientToWindowManagement(AbstractClient *c)
w->setMaximizeable(c->isMaximizable());
w->setMinimizeable(c->isMinimizable());
w->setFullscreenable(c->isFullScreenable());
w->setThemedIconName(c->icon().name().isEmpty() ? QStringLiteral("xorg") : c->icon().name());
connect(c, &AbstractClient::captionChanged, w, [w, c] { w->setTitle(c->caption()); });
connect(c, &AbstractClient::desktopChanged, w,
[w, c] {
......@@ -250,6 +251,12 @@ void WaylandServer::announceClientToWindowManagement(AbstractClient *c)
}
);
connect(c, &AbstractClient::demandsAttentionChanged, w, [w, c] { w->setDemandsAttention(c->isDemandingAttention()); });
connect(c, &AbstractClient::iconChanged, w,
[w, c] {
const QIcon icon = c->icon();
w->setThemedIconName(icon.name().isEmpty() ? QStringLiteral("xorg") : icon.name());
}
);
connect(c, &QObject::destroyed, w, &KWayland::Server::PlasmaWindowInterface::unmap);
connect(w, &PlasmaWindowInterface::closeRequested, c, [c] { c->closeWindow(); });
connect(w, &PlasmaWindowInterface::virtualDesktopRequested, c,
......
Markdown is supported
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