diff --git a/geometry.cpp b/geometry.cpp index 0749f5d8a7..ae7ad26f22 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2574,9 +2574,7 @@ bool Client::startMoveResize() Notify::raise(isResize() ? Notify::ResizeStart : Notify::MoveStart); emit clientStartUserMovedResized(this); #ifdef KWIN_BUILD_SCREENEDGES - if (options->electricBorders() == Options::ElectricMoveOnly || - options->electricBorderMaximize() || - options->electricBorderTiling()) + if (options->electricBorders() == Options::ElectricMoveOnly) workspace()->screenEdge()->reserveDesktopSwitching(true, Qt::Vertical|Qt::Horizontal); #endif if (fakeMove) // fix geom_restore position - it HAS to happen at the end, ie. when all moving is set up. inline call will lock focus!! @@ -2584,37 +2582,6 @@ bool Client::startMoveResize() return true; } -static ElectricBorder electricBorderFromMode(QuickTileMode mode) -{ - // special case, currently maxmizing is done from the electric top corner - if (mode == QuickTileMaximize) - return ElectricTop; - - // sanitize the mode, ie. simplify "invalid" combinations - if ((mode & QuickTileHorizontal) == QuickTileHorizontal) - mode &= ~QuickTileHorizontal; - if ((mode & QuickTileVertical) == QuickTileVertical) - mode &= ~QuickTileVertical; - - if (mode == QuickTileLeft) - return ElectricLeft; - if (mode == QuickTileRight) - return ElectricRight; - if (mode == (QuickTileTop|QuickTileLeft)) - return ElectricTopLeft; - if (mode == (QuickTileTop|QuickTileRight)) - return ElectricTopRight; - if (mode == (QuickTileBottom|QuickTileLeft)) - return ElectricBottomLeft; - if (mode == (QuickTileBottom|QuickTileRight)) - return ElectricBottomRight; - if (mode == QuickTileTop) - return ElectricTop; - if (mode == QuickTileBottom) - return ElectricBottom; - return ElectricNone; -} - void Client::finishMoveResize(bool cancel) { const bool wasResize = isResize(); // store across leaveMoveResize @@ -2642,14 +2609,6 @@ void Client::finishMoveResize(bool cancel) if (isElectricBorderMaximizing()) { setQuickTileMode(electricMode); - const ElectricBorder border = electricBorderFromMode(electricMode); - if (border == ElectricNone) - kDebug(1212) << "invalid electric mode" << electricMode << "leading to invalid array access,\ - this should not have happened!"; -#ifdef KWIN_BUILD_SCREENEDGES - else - workspace()->screenEdge()->restoreSize(border); -#endif electricMaximizing = false; workspace()->outline()->hide(); } else if (!cancel) { @@ -2697,9 +2656,7 @@ void Client::leaveMoveResize() syncRequest.timeout = NULL; #endif #ifdef KWIN_BUILD_SCREENEDGES - if (options->electricBorders() == Options::ElectricMoveOnly || - options->electricBorderMaximize() || - options->electricBorderTiling()) + if (options->electricBorders() == Options::ElectricMoveOnly) workspace()->screenEdge()->reserveDesktopSwitching(false, Qt::Vertical|Qt::Horizontal); #endif }