Remove assumption that the workspace starts at (0, 0)

If a leftmost output is temporarily disabled but outputs on the right
hand side are not moved, some windows may stop being movable because the
Workspace will return bad FullArea. In order to improve handling of
that case, make the FullArea same as the workspace geometry.
This commit is contained in:
Vlad Zahorodnii 2022-07-06 12:22:32 +03:00
parent 7d5d35928f
commit 53d25c7228

View file

@ -2262,7 +2262,7 @@ QRect Workspace::clientArea(clientAreaOption opt, const Output *output, const Vi
workArea = m_workAreas.value(desktop);
if (workArea.isNull()) {
workArea = is_multihead ? effectiveOutput->geometry() : QRect(QPoint(0, 0), m_geometry.size());
workArea = is_multihead ? effectiveOutput->geometry() : m_geometry;
}
switch (opt) {
@ -2277,7 +2277,7 @@ QRect Workspace::clientArea(clientAreaOption opt, const Output *output, const Vi
case WorkArea:
return is_multihead ? screenArea : workArea;
case FullArea:
return QRect(QPoint(0, 0), m_geometry.size());
return m_geometry;
default:
Q_UNREACHABLE();