aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <[email protected]>2016-11-09 03:47:13 +0000
committerDavid Edmundson <[email protected]>2017-03-29 20:53:22 +0100
commitbd1d88359f39e8fcf46e082668c44b4f579d05cf (patch)
treeb7bb4f620e7c4f038465d173a869bbb01280baea
parentadd93b3e3655222788cef980f6b6971e6572bc24 (diff)
Scale xwindowed EGL output
Reviewers: #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3500
-rw-r--r--plugins/platforms/x11/windowed/egl_x11_backend.cpp4
-rw-r--r--plugins/platforms/x11/windowed/x11windowed_backend.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/platforms/x11/windowed/egl_x11_backend.cpp b/plugins/platforms/x11/windowed/egl_x11_backend.cpp
index 8274fe7..d0e0852 100644
--- a/plugins/platforms/x11/windowed/egl_x11_backend.cpp
+++ b/plugins/platforms/x11/windowed/egl_x11_backend.cpp
@@ -106,7 +106,9 @@ void EglX11Backend::setupViewport(int screenId)
const QSize &overall = screens()->size();
const QRect &v = screens()->geometry(screenId);
// TODO: are the values correct?
- glViewport(-v.x(), v.height() - overall.height() - v.y(), overall.width(), overall.height());
+
+ qreal scale = screens()->scale(screenId);
+ glViewport(-v.x(), v.height() - overall.height() - v.y(), overall.width() * scale, overall.height() * scale);
}
void EglX11Backend::endRenderingFrameForScreen(int screenId, const QRegion &renderedRegion, const QRegion &damagedRegion)
diff --git a/plugins/platforms/x11/windowed/x11windowed_backend.cpp b/plugins/platforms/x11/windowed/x11windowed_backend.cpp
index 9256f13..302bac7 100644
--- a/plugins/platforms/x11/windowed/x11windowed_backend.cpp
+++ b/plugins/platforms/x11/windowed/x11windowed_backend.cpp
@@ -471,7 +471,7 @@ QVector<QRect> X11WindowedBackend::screenGeometries() const
{
QVector<QRect> ret;
for (auto it = m_windows.constBegin(); it != m_windows.constEnd(); ++it) {
- ret << QRect((*it).internalPosition, (*it).size);
+ ret << QRect((*it).internalPosition, (*it).size / (*it).scale);
}
return ret;
}