Properly calculate the offset between multiple screens in FlipSwitch

The code assumed that screens border to each other. That is the height
of the one screen is the y position of the other screen.

BUG: 304520
FIXED-IN: 4.9.1
REVIEW: 105958
This commit is contained in:
Martin Gräßlin 2012-08-09 12:51:12 +02:00
parent 874fccacd5
commit 0286540c29

View file

@ -828,10 +828,10 @@ void FlipSwitchEffect::adjustWindowMultiScreen(const KWin::EffectWindow* w, Wind
}
} else {
if (clientRect.width() != fullRect.width() && clientRect.x() < rect.x()) {
data.xTranslate -= clientRect.width();
data.xTranslate -= (m_screenArea.x() - clientRect.x());
}
if (clientRect.height() != fullRect.height() && clientRect.y() < m_screenArea.y()) {
data.yTranslate -= clientRect.height();
data.yTranslate -= (m_screenArea.y() - clientRect.y());
}
}
}