From 96830d2295a66c272a8b913d409da99c6f5e1b35 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 30 Aug 2021 10:35:21 +0300 Subject: [PATCH] x11: Simplify X11Output::geometry() There is a separate type for placeholder x11 outputs, so X11Output can return its geometry without performing any checks. --- src/plugins/platforms/x11/standalone/x11_output.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/x11/standalone/x11_output.cpp b/src/plugins/platforms/x11/standalone/x11_output.cpp index 2640a074f4..087891723a 100644 --- a/src/plugins/platforms/x11/standalone/x11_output.cpp +++ b/src/plugins/platforms/x11/standalone/x11_output.cpp @@ -7,7 +7,7 @@ SPDX-License-Identifier: GPL-2.0-or-later */ #include "x11_output.h" -#include "screens.h" +#include "kwinglobals.h" namespace KWin { @@ -25,10 +25,7 @@ QString X11Output::name() const QRect X11Output::geometry() const { - if (m_geometry.isValid()) { - return m_geometry; - } - return QRect(QPoint(0, 0), Screens::self()->displaySize()); // xinerama, lacks RandR + return m_geometry; } void X11Output::setGeometry(QRect set)