[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.
This commit is contained in:
parent
31e599a63d
commit
8b6fef457b
1 changed files with 7 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue