Drop Screens::displaySize()

It's the same as the workspace geometry, i.e. the bounding geometry of
all outputs.
This commit is contained in:
Vlad Zahorodnii 2021-11-26 10:32:55 +02:00
parent 3ad7bf01c8
commit dc3d0444e4
5 changed files with 9 additions and 20 deletions

View file

@ -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)

View file

@ -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);

View file

@ -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.

View file

@ -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);
/**

View file

@ -15,7 +15,7 @@
#include "input.h"
#include "screenedge.h"
#include "screens.h"
#include "workspace.h"
// KDE
#include <KConfigGroup>
#include <kconfigloader.h>
@ -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