Commit 16d9a08f authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Ensure that Window::output() is always in sync with the frame geometry

plasmashell may see new output layout before kwin_x11 and move desktop
windows accordingly. If that happens, the desktop windows will have old
outputs in Window::output() property because the Workspace doesn't
re-check outputs if the output layout changes.

In order to fix the Window::output() property getting out of sync,
re-check the current output after the output layout changes. It should
also fix a visual glitch in the slide effect caused by
EffectWindow::screen() not being correct.
parent 6cc4b799
Pipeline #226151 passed with stage
in 13 minutes and 58 seconds
......@@ -1482,16 +1482,6 @@ void Workspace::removeOutput(Output *output)
disconnect(output, &Output::geometryChanged, this, &Workspace::desktopResized);
const auto stack = stackingOrder();
for (Window *window : stack) {
if (window->output() == output) {
if (window->moveResizeOutput() == output) {
Q_EMIT outputRemoved(output);
......@@ -2281,6 +2271,12 @@ void Workspace::desktopResized()
const auto stack = stackingOrder();
for (Window *window : stack) {
// restore cursor position
const auto oldCursorOutput = std::find_if(m_oldScreenGeometries.cbegin(), m_oldScreenGeometries.cend(), [](const auto &geometry) {
return geometry.contains(Cursors::self()->mouse()->pos());
Supports Markdown
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