check workspace position after screen change of any max'd client

also only unset max'd state when resizing, but not when moving a max'd client
BUG: 279051
CCBUG: 279529
REVIEW: 102414
(cherry picked from commit ea91e9dea63cf58fcf0d45d7e2f4783d0b70b8bb)

Conflicts:

	kwin/geometry.cpp
icc-effect-5.14.5
Thomas Lübking 2011-08-23 22:51:49 +02:00
parent b5279af212
commit 123e259441
2 changed files with 12 additions and 6 deletions

View File

@ -643,7 +643,7 @@ private:
uint urgency : 1; ///< XWMHints, UrgencyHint uint urgency : 1; ///< XWMHints, UrgencyHint
uint ignore_focus_stealing : 1; ///< Don't apply focus stealing prevention to this client uint ignore_focus_stealing : 1; ///< Don't apply focus stealing prevention to this client
uint demands_attention : 1; uint demands_attention : 1;
int m_screenNum; int m_screenNum, m_formerScreenNum;
bool blocks_compositing; bool blocks_compositing;
WindowRules client_rules; WindowRules client_rules;
void getWMHints(); void getWMHints();

View File

@ -2538,13 +2538,17 @@ bool Client::startMoveResize()
return false; return false;
} }
m_formerScreenNum = screen();
// If we have quick maximization enabled then it's safe to automatically restore windows // If we have quick maximization enabled then it's safe to automatically restore windows
// when starting a move as the user can undo their action by moving the window back to // when starting a move as the user can undo their action by moving the window back to
// the top of the screen. When the setting is disabled then doing so is confusing. // the top of the screen. When the setting is disabled then doing so is confusing.
if (maximizeMode() == MaximizeFull && options->moveResizeMaximizedWindows()) { if (maximizeMode() != MaximizeRestore && options->moveResizeMaximizedWindows()) {
// allow move resize, but unset maximization state // allow moveResize, but unset maximization state in resize case
geom_restore = geom_pretile = geometry(); // "restore" to current geometry if (mode != PositionCenter) { // means "isResize()" but moveResizeMode = true is set below
setMaximize(false, false); geom_restore = geom_pretile = geometry(); // "restore" to current geometry
setMaximize(false, false);
}
} else if ((maximizeMode() == MaximizeFull && options->electricBorderMaximize()) || } else if ((maximizeMode() == MaximizeFull && options->electricBorderMaximize()) ||
(quick_tile_mode != QuickTileNone && isMovable() && mode == PositionCenter)) { (quick_tile_mode != QuickTileNone && isMovable() && mode == PositionCenter)) {
// Exit quick tile mode when the user attempts to move a tiled window, cannot use isMove() yet // Exit quick tile mode when the user attempts to move a tiled window, cannot use isMove() yet
@ -2625,6 +2629,8 @@ void Client::finishMoveResize(bool cancel)
setGeometry(initialMoveResizeGeom); setGeometry(initialMoveResizeGeom);
else else
setGeometry(moveResizeGeom); setGeometry(moveResizeGeom);
if (maximizeMode() != MaximizeRestore && m_formerScreenNum != screen())
checkWorkspacePosition();
} }
#else #else
if (cancel) if (cancel)
@ -2634,7 +2640,7 @@ void Client::finishMoveResize(bool cancel)
Q_UNUSED(wasResize); Q_UNUSED(wasResize);
Q_UNUSED(wasMove); Q_UNUSED(wasMove);
#endif #endif
if (cancel) if (cancel) // TODO: this looks like a patch bug - tiling gets the variable and non-tiling acts above
setGeometry(initialMoveResizeGeom); setGeometry(initialMoveResizeGeom);
if (isElectricBorderMaximizing()) { if (isElectricBorderMaximizing()) {