Commit 706eb16b authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Remove Platform::screenGeometries and Platform::screenScales

If you need screen geometries or scales, use AbstractOutput::geometry()
and AbstractOutput::scale(), respectively.
parent cadb13de
......@@ -506,16 +506,6 @@ QSize Platform::screenSize() const
return QSize();
}
QVector<QRect> Platform::screenGeometries() const
{
return QVector<QRect>({QRect(QPoint(0, 0), screenSize())});
}
QVector<qreal> Platform::screenScales() const
{
return QVector<qreal>({1});
}
bool Platform::requiresCompositing() const
{
return true;
......
......@@ -152,21 +152,6 @@ public:
* Base implementation returns an invalid size.
*/
virtual QSize screenSize() const;
/**
* Implementing subclasses should provide all geometries in case the backend represents
* a basic screen and uses the BasicScreens.
*
* Base implementation returns one QRect positioned at 0/0 with screenSize() as size.
*/
virtual QVector<QRect> screenGeometries() const;
/**
* Implementing subclasses should provide all geometries in case the backend represents
* a basic screen and uses the BasicScreens.
*
* Base implementation returns a screen with a scale of 1.
*/
virtual QVector<qreal> screenScales() const;
/**
* Implement this method to receive configuration change requests through KWayland's
* OutputManagement interface.
......
......@@ -475,7 +475,7 @@ void X11WindowedBackend::createCursor(const QImage &srcImage, const QPoint &hots
const xcb_cursor_t cid = xcb_generate_id(m_connection);
//right now on X we only have one scale between all screens, and we know we will have at least one screen
const qreal outputScale = screenScales().first();
const qreal outputScale = 1;
const QSize targetSize = srcImage.size() * outputScale / srcImage.devicePixelRatio();
const QImage img = srcImage.scaled(targetSize, Qt::KeepAspectRatio);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment