Expose client shade state to kwayland's interface.

Summary:
Makes use of new API in kwayland to expose shade state.

Depends on D1417.

Reviewers: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1418
icc-effect-5.14.5
Eike Hein 2016-04-15 20:41:10 +09:00
parent e2e6d8b08b
commit ef6a2cfa64
1 changed files with 8 additions and 0 deletions

View File

@ -648,6 +648,8 @@ void AbstractClient::setupWindowManagementInterface()
w->setThemedIconName(icon().name().isEmpty() ? QStringLiteral("xorg") : icon().name());
w->setAppId(QString::fromUtf8(resourceName()));
w->setSkipTaskbar(skipTaskbar());
w->setShadable(isShadeable());
w->setShaded(isShade());
connect(this, &AbstractClient::skipTaskbarChanged, w,
[w, this] {
w->setSkipTaskbar(skipTaskbar());
@ -687,6 +689,7 @@ void AbstractClient::setupWindowManagementInterface()
w->setAppId(QString::fromUtf8(resourceName()));
}
);
connect(this, &AbstractClient::shadeChanged, w, [w, this] { w->setShaded(isShade()); });
connect(w, &PlasmaWindowInterface::closeRequested, this, [this] { closeWindow(); });
connect(w, &PlasmaWindowInterface::virtualDesktopRequested, this,
[this] (quint32 desktop) {
@ -734,6 +737,11 @@ void AbstractClient::setupWindowManagementInterface()
}
}
);
connect(w, &PlasmaWindowInterface::shadedRequested, this,
[this] (bool set) {
setShade(set);
}
);
m_windowManagementInterface = w;
}