From ba53407b52ed8bc1df72b1affd5a49b16e72bfd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 22 Oct 2015 16:01:51 +0200 Subject: [PATCH] Move finishMoveResize(bool) to AbstractClient --- abstract_client.h | 1 + client.h | 1 - geometry.cpp | 4 +++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/abstract_client.h b/abstract_client.h index c368762a41..bc44d71fa1 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -696,6 +696,7 @@ protected: * Sets an appropriate cursor shape for the logical mouse position. */ void updateCursor(); + void finishMoveResize(bool cancel); /** * Leaves the move resize mode. * diff --git a/client.h b/client.h index d21c2a79eb..199d463790 100644 --- a/client.h +++ b/client.h @@ -544,7 +544,6 @@ private: void getSyncCounter(); void sendSyncRequest(); bool startMoveResize(); - void finishMoveResize(bool cancel); void leaveMoveResize() override; void handleMoveResize(int x, int y, int x_root, int y_root); void handleMoveResize(const QPoint &local, const QPoint &global); diff --git a/geometry.cpp b/geometry.cpp index c6b9c01c0c..db998daeef 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2666,7 +2666,7 @@ bool Client::startMoveResize() return true; } -void Client::finishMoveResize(bool cancel) +void AbstractClient::finishMoveResize(bool cancel) { const bool wasResize = isResize(); // store across leaveMoveResize leaveMoveResize(); @@ -2697,6 +2697,7 @@ void Client::finishMoveResize(bool cancel) setQuickTileMode(electricBorderMode()); setElectricBorderMaximizing(false); } else if (!cancel) { + QRect geom_restore = geometryRestore(); if (!(maximizeMode() & MaximizeHorizontal)) { geom_restore.setX(geometry().x()); geom_restore.setWidth(geometry().width()); @@ -2705,6 +2706,7 @@ void Client::finishMoveResize(bool cancel) geom_restore.setY(geometry().y()); geom_restore.setHeight(geometry().height()); } + setGeometryRestore(geom_restore); } // FRAME update();