Add support for DecoratedClient::windowClass()

This commit is contained in:
Vlad Zahorodnii 2022-11-17 20:57:00 +02:00
parent b867f76d41
commit 9e97c7383c
4 changed files with 12 additions and 0 deletions

View file

@ -291,5 +291,10 @@ bool DecoratedClientImpl::isApplicationMenuActive() const
return m_window->applicationMenuActive(); return m_window->applicationMenuActive();
} }
QString DecoratedClientImpl::windowClass() const
{
return m_window->resourceName() + QLatin1Char(' ') + m_window->resourceClass();
}
} }
} }

View file

@ -55,6 +55,7 @@ public:
bool providesContextHelp() const override; bool providesContextHelp() const override;
QSize size() const override; QSize size() const override;
int width() const override; int width() const override;
QString windowClass() const override;
WId windowId() const override; WId windowId() const override;
Qt::Edges adjacentScreenEdges() const override; Qt::Edges adjacentScreenEdges() const override;

View file

@ -271,6 +271,11 @@ Qt::Edges PreviewClient::adjacentScreenEdges() const
return edges; return edges;
} }
QString PreviewClient::windowClass() const
{
return QString();
}
bool PreviewClient::hasApplicationMenu() const bool PreviewClient::hasApplicationMenu() const
{ {
return true; return true;

View file

@ -80,6 +80,7 @@ public:
QPalette palette() const override; QPalette palette() const override;
QColor color(ColorGroup group, ColorRole role) const override; QColor color(ColorGroup group, ColorRole role) const override;
Qt::Edges adjacentScreenEdges() const override; Qt::Edges adjacentScreenEdges() const override;
QString windowClass() const override;
bool hasApplicationMenu() const override; bool hasApplicationMenu() const override;
bool isApplicationMenuActive() const override; bool isApplicationMenuActive() const override;