Commit 29588812 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Restore old behavior of Workspace::clientArea(clientOpt, Toplevel)

When geometry updates are blocked, the output doesn't get updated. This
breaks Workspace::clientArea() overload that takes only the window.

Previously, clientArea() would look up the output where the window is
every time it's called, so the fact that the screen id or AbstractOutput
is unsynchronized with the frame geometry was irrelevant.

This change restores the old behavior as 5.23 is affected by the
output() being out of sync with the frameGeometry(). Specifically, when
kwin starts managing an X11 window, it will block geometry updates,
setup the window, e.g. make it fullscreen, and unblock geometry updates.

Since Workspace::clientArea(clientArea, Toplevel) uses the output(),
X11Client::setFullScreen() will most likely put the X11 window at a
wrong output if it's called inside X11Client::manage().

BUG: 443787


(cherry picked from commit 6d5fc9fd)
parent a3ffcfa8
......@@ -2361,7 +2361,7 @@ QRect Workspace::clientArea(clientAreaOption opt, const QPoint& p, int desktop)
QRect Workspace::clientArea(clientAreaOption opt, const Toplevel *window) const
{
return clientArea(opt, window, window->output());
return clientArea(opt, window, window->frameGeometry().center());
}
QRect Workspace::clientArea(clientAreaOption opt, const Toplevel *window, const AbstractOutput *output) const
......
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