fix preproc branching (lacked checkWorkspacePosition)

This commit is contained in:
Thomas Lübking 2012-05-09 21:49:55 +02:00
parent 8ee66eff55
commit 4f458d2fe9

View file

@ -2606,19 +2606,19 @@ static ElectricBorder electricBorderFromMode(QuickTileMode mode)
void Client::finishMoveResize(bool cancel) void Client::finishMoveResize(bool cancel)
{ {
// store for notification
bool wasResize = isResize();
bool wasMove = isMove();
leaveMoveResize();
#ifdef KWIN_BUILD_TILING #ifdef KWIN_BUILD_TILING
if (workspace()->tiling()->isEnabled()) { if (workspace()->tiling()->isEnabled()) {
const bool wasResize = isResize(); // store across leaveMoveResize
const bool wasMove = isMove();
leaveMoveResize();
if (wasResize) if (wasResize)
workspace()->tiling()->notifyTilingWindowResizeDone(this, moveResizeGeom, initialMoveResizeGeom, cancel); workspace()->tiling()->notifyTilingWindowResizeDone(this, moveResizeGeom, initialMoveResizeGeom, cancel);
else if (wasMove) else if (wasMove)
workspace()->tiling()->notifyTilingWindowMoveDone(this, moveResizeGeom, initialMoveResizeGeom, cancel); workspace()->tiling()->notifyTilingWindowMoveDone(this, moveResizeGeom, initialMoveResizeGeom, cancel);
} else { } else
#endif
{
leaveMoveResize();
if (cancel) if (cancel)
setGeometry(initialMoveResizeGeom); setGeometry(initialMoveResizeGeom);
else else
@ -2626,14 +2626,6 @@ void Client::finishMoveResize(bool cancel)
if (screen() != moveResizeStartScreen && maximizeMode() != MaximizeRestore) if (screen() != moveResizeStartScreen && maximizeMode() != MaximizeRestore)
checkWorkspacePosition(); checkWorkspacePosition();
} }
#else
if (cancel)
setGeometry(initialMoveResizeGeom);
else
setGeometry(moveResizeGeom);
Q_UNUSED(wasResize);
Q_UNUSED(wasMove);
#endif
if (isElectricBorderMaximizing()) { if (isElectricBorderMaximizing()) {
setQuickTileMode(electricMode); setQuickTileMode(electricMode);