diff --git a/autotests/mock_workspace.cpp b/autotests/mock_workspace.cpp index adcb65d752..394975e1e1 100644 --- a/autotests/mock_workspace.cpp +++ b/autotests/mock_workspace.cpp @@ -58,6 +58,11 @@ bool MockWorkspace::showingDesktop() const return m_showingDesktop; } +QRect MockWorkspace::geometry() const +{ + return QRect(); +} + QRect MockWorkspace::clientArea(clientAreaOption, int screen, int desktop) const { Q_UNUSED(screen) diff --git a/autotests/mock_workspace.h b/autotests/mock_workspace.h index 11e183a39d..ed4e520fe1 100644 --- a/autotests/mock_workspace.h +++ b/autotests/mock_workspace.h @@ -32,6 +32,7 @@ public: AbstractClient *moveResizeClient() const; void setShowingDesktop(bool showing); bool showingDesktop() const; + QRect geometry() const; QRect clientArea(clientAreaOption, int screen, int desktop) const; void setActiveClient(AbstractClient *c); diff --git a/src/screens.cpp b/src/screens.cpp index c62f97df0e..847d572f46 100644 --- a/src/screens.cpp +++ b/src/screens.cpp @@ -122,11 +122,6 @@ int Screens::intersecting(const QRect &r) const return cnt; } -QSize Screens::displaySize() const -{ - return size(); -} - int Screens::number(const QPoint &pos) const { // TODO: Do something about testScreens and other tests that use MockScreens. diff --git a/src/screens.h b/src/screens.h index 2c1836f2f9..cdd70bbf73 100644 --- a/src/screens.h +++ b/src/screens.h @@ -66,18 +66,6 @@ public: int intersecting(const QRect &r) const; - /** - * The virtual bounding size of all screens combined. - * The default implementation returns the same as @ref size and that is the - * method which should be preferred. - * - * This method is only for cases where the platform specific implementation needs - * to support different virtual sizes like on X11 with XRandR panning. - * - * @see size - */ - QSize displaySize() const; - Q_SIGNALS: void countChanged(int previousCount, int newCount); /** diff --git a/src/scripting/scriptedeffect.cpp b/src/scripting/scriptedeffect.cpp index 379a03ef27..d7e14fce18 100644 --- a/src/scripting/scriptedeffect.cpp +++ b/src/scripting/scriptedeffect.cpp @@ -15,7 +15,7 @@ #include "input.h" #include "screenedge.h" -#include "screens.h" +#include "workspace.h" // KDE #include #include @@ -605,12 +605,12 @@ QJSValue ScriptedEffect::readConfig(const QString &key, const QJSValue &defaultV int ScriptedEffect::displayWidth() const { - return screens()->displaySize().width(); + return workspace()->geometry().width(); } int ScriptedEffect::displayHeight() const { - return screens()->displaySize().height(); + return workspace()->geometry().height(); } int ScriptedEffect::animationTime(int defaultTime) const