Commit 750dd068 authored by Benjamin Port's avatar Benjamin Port

[Wayland] Send stacking order event through plasma window management protocol

Summary: Depends on: D29054

Reviewers: zzag, davidedmundson, meven

Reviewed By: davidedmundson, meven

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29055
parent 028aecaa
......@@ -864,6 +864,13 @@ public:
*/
virtual bool supportsWindowRules() const;
/**
* Return window management interface
*/
KWayland::Server::PlasmaWindowInterface *windowManagementInterface() const {
return m_windowManagementInterface;
}
public Q_SLOTS:
virtual void closeWindow() = 0;
......@@ -998,10 +1005,6 @@ protected:
m_quickTileMode = newMode;
}
KWayland::Server::PlasmaWindowInterface *windowManagementInterface() const {
return m_windowManagementInterface;
}
// geometry handling
void checkOffscreenPosition(QRect *geom, const QRect &screenArea);
int borderLeft() const;
......
......@@ -404,7 +404,6 @@ bool WaylandServer::init(const QByteArray &socketName, InitializationFlags flags
}
);
m_virtualDesktopManagement = m_display->createPlasmaVirtualDesktopManagement(m_display);
m_virtualDesktopManagement->create();
m_windowManagement->setPlasmaVirtualDesktopManagementInterface(m_virtualDesktopManagement);
......@@ -490,6 +489,21 @@ void WaylandServer::initWorkspace()
);
}
);
connect(workspace(), &Workspace::workspaceInitialized, this, [this] {
auto f = [this] () {
QVector<quint32> ids;
for (Toplevel *toplevel : workspace()->stackingOrder()) {
auto *client = qobject_cast<AbstractClient *>(toplevel);
if (client && client->windowManagementInterface()) {
ids << client->windowManagementInterface()->internalId();
}
}
m_windowManagement->setStackingOrder(ids);
};
f();
connect(workspace(), &Workspace::stackingOrderChanged, this, f);
});
}
if (hasScreenLockerIntegration()) {
......
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