From 7804a352a89607072bca3a3e6667c060f974808a Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Sun, 17 Apr 2016 23:43:45 +0900 Subject: [PATCH] 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 --- abstract_client.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/abstract_client.cpp b/abstract_client.cpp index cd476eb689..e52be5a742 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -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);