Move finishMoveResize(bool) to AbstractClient

This commit is contained in:
Martin Gräßlin 2015-10-22 16:01:51 +02:00
parent 1c40e809ea
commit ba53407b52
3 changed files with 4 additions and 2 deletions

View file

@ -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.
*

View file

@ -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);

View file

@ -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();