diff --git a/src/input.cpp b/src/input.cpp index 81de7e64c3..e46eea5ece 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -974,7 +974,7 @@ class InternalWindowEventFilter : public InputEventFilter { if (!w->isVisible()) { continue; } - if (!screens()->geometry().contains(w->geometry())) { + if (!workspace()->geometry().contains(w->geometry())) { continue; } if (w->property("_q_showWithoutActivating").toBool()) { diff --git a/src/pointer_input.cpp b/src/pointer_input.cpp index ffd516fcfe..77d133a328 100644 --- a/src/pointer_input.cpp +++ b/src/pointer_input.cpp @@ -157,7 +157,7 @@ void PointerInputRedirection::init() connect(workspace(), &Workspace::clientAdded, this, setupMoveResizeConnection); // warp the cursor to center of screen - warp(screens()->geometry().center()); + warp(workspace()->geometry().center()); updateAfterScreenChange(); } @@ -811,7 +811,7 @@ void PointerInputRedirection::updatePosition(const QPointF &pos) // verify that at least one screen contains the pointer position QPointF p = pos; if (!screenContainsPos(p)) { - const QRectF unitedScreensGeometry = screens()->geometry(); + const QRectF unitedScreensGeometry = workspace()->geometry(); p = confineToBoundingBox(p, unitedScreensGeometry); if (!screenContainsPos(p)) { const AbstractOutput *currentOutput = kwinApp()->platform()->outputAt(m_pos.toPoint()); diff --git a/src/scripting/workspace_wrapper.cpp b/src/scripting/workspace_wrapper.cpp index 256111036c..5af7b70283 100644 --- a/src/scripting/workspace_wrapper.cpp +++ b/src/scripting/workspace_wrapper.cpp @@ -237,7 +237,7 @@ QSize WorkspaceWrapper::workspaceSize() const QSize WorkspaceWrapper::displaySize() const { - return screens()->displaySize(); + return workspace()->geometry().size(); } int WorkspaceWrapper::displayWidth() const @@ -368,12 +368,12 @@ int WorkspaceWrapper::activeScreen() const QRect WorkspaceWrapper::virtualScreenGeometry() const { - return screens()->geometry(); + return workspace()->geometry(); } QSize WorkspaceWrapper::virtualScreenSize() const { - return screens()->size(); + return workspace()->geometry().size(); } void WorkspaceWrapper::sendClientToScreen(AbstractClient *client, int screen) diff --git a/src/useractions.cpp b/src/useractions.cpp index eefc0224e1..04f4bd03c0 100644 --- a/src/useractions.cpp +++ b/src/useractions.cpp @@ -1607,13 +1607,13 @@ void Workspace::switchWindow(Direction direction) auto opposite = [&] { switch(direction) { case DirectionNorth: - return QPoint(curPos.x(), screens()->geometry().height()); + return QPoint(curPos.x(), geometry().height()); case DirectionSouth: return QPoint(curPos.x(), 0); case DirectionEast: return QPoint(0, curPos.y()); case DirectionWest: - return QPoint(screens()->geometry().width(), curPos.y()); + return QPoint(geometry().width(), curPos.y()); default: Q_UNREACHABLE(); } diff --git a/src/x11client.cpp b/src/x11client.cpp index f64efbdd9c..e2e3af0f43 100644 --- a/src/x11client.cpp +++ b/src/x11client.cpp @@ -4617,7 +4617,7 @@ NETExtendedStrut X11Client::strut() const { NETExtendedStrut ext = info->extendedStrut(); NETStrut str = info->strut(); - const QSize displaySize = screens()->displaySize(); + const QSize displaySize = workspace()->geometry().size(); if (ext.left_width == 0 && ext.right_width == 0 && ext.top_width == 0 && ext.bottom_width == 0 && (str.left != 0 || str.right != 0 || str.top != 0 || str.bottom != 0)) { // build extended from simple @@ -4648,7 +4648,7 @@ NETExtendedStrut X11Client::strut() const StrutRect X11Client::strutRect(StrutArea area) const { Q_ASSERT(area != StrutAreaAll); // Not valid - const QSize displaySize = screens()->displaySize(); + const QSize displaySize = workspace()->geometry().size(); NETExtendedStrut strutArea = strut(); switch(area) { case StrutAreaTop: