Hook up movable and resizable states.

Summary:
Sets movable and resizable states on the Wayland window.

kwin doesn't have state change signals for this, so it's a one-time thing.

Depends on D1432.

Reviewers: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1434
icc-effect-5.14.5
Eike Hein 2016-04-17 23:43:45 +09:00
parent e73a86d420
commit 7804a352a8
1 changed files with 14 additions and 0 deletions

View File

@ -650,6 +650,8 @@ void AbstractClient::setupWindowManagementInterface()
w->setSkipTaskbar(skipTaskbar());
w->setShadeable(isShadeable());
w->setShaded(isShade());
w->setResizable(isResizable());
w->setMovable(isMovable());
connect(this, &AbstractClient::skipTaskbarChanged, w,
[w, this] {
w->setSkipTaskbar(skipTaskbar());
@ -691,6 +693,18 @@ void AbstractClient::setupWindowManagementInterface()
);
connect(this, &AbstractClient::shadeChanged, w, [w, this] { w->setShaded(isShade()); });
connect(w, &PlasmaWindowInterface::closeRequested, this, [this] { closeWindow(); });
connect(w, &PlasmaWindowInterface::moveRequested, this,
[this] {
Cursor::setPos(geometry().center());
performMouseCommand(Options::MouseMove, Cursor::pos());
}
);
connect(w, &PlasmaWindowInterface::resizeRequested, this,
[this] {
Cursor::setPos(geometry().bottomRight());
performMouseCommand(Options::MouseResize, Cursor::pos());
}
);
connect(w, &PlasmaWindowInterface::virtualDesktopRequested, this,
[this] (quint32 desktop) {
workspace()->sendClientToDesktop(this, desktop + 1, true);