Commit 2c052291 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

qpa: Set minimum device ratio of 1 for windows

This is to prevent rendering issues in the present windows close buttons
as Qt supports scale factors that are less than one poorly.
parent c9ac2e3f
......@@ -29,7 +29,7 @@ Window::Window(QWindow *window)
: QPlatformWindow(window)
, m_eglDisplay(kwinApp()->platform()->sceneEglDisplay())
, m_windowId(++s_windowId)
, m_scale(screens()->maxScale())
, m_scale(std::max(qreal(1), screens()->maxScale()))
{
if (window->surfaceType() == QSurface::OpenGLSurface) {
// The window will use OpenGL for drawing.
......
......@@ -57,7 +57,7 @@ private:
EGLSurface m_eglSurface = EGL_NO_SURFACE;
quint32 m_windowId;
bool m_resized = false;
int m_scale = 1;
qreal m_scale = 1;
};
}
......
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