Commit 65ab2fde authored by Martin Flöser's avatar Martin Flöser
Browse files

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
parent c0d72b06
...@@ -828,10 +828,10 @@ void FlipSwitchEffect::adjustWindowMultiScreen(const KWin::EffectWindow* w, Wind ...@@ -828,10 +828,10 @@ void FlipSwitchEffect::adjustWindowMultiScreen(const KWin::EffectWindow* w, Wind
} }
} else { } else {
if (clientRect.width() != fullRect.width() && clientRect.x() < rect.x()) { 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()) { if (clientRect.height() != fullRect.height() && clientRect.y() < m_screenArea.y()) {
data.yTranslate -= clientRect.height(); data.yTranslate -= (m_screenArea.y() - clientRect.y());
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment