Commit ba53407b authored by Martin Flöser's avatar Martin Flöser

Move finishMoveResize(bool) to AbstractClient

parent 1c40e809
......@@ -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.
*
......
......@@ -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);
......
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment