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.
This commit is contained in:
parent
c9ac2e3fb8
commit
2c05229141
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue