[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
This commit is contained in:
parent
028aecaaf9
commit
750dd068e5
2 changed files with 22 additions and 5 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue