Commit 95c983e6 authored by David Edmundson's avatar David Edmundson

Handle buffer scales changing dynamically

Currently when a client changes it's buffer size the result is corrupt
until we move the window.

When a client buffer scale changes we need to redraw the whole window,
and most importantly flush the cached window quads, which reference the

This is not handled by the doSetGeometry() from the size changing as the
normalised size of the client remains the same so it no-ops.

Test Plan:
Opened gtk3-demo and changed screen scale. It's now perfect.
Patch for Qt to work correctly incoming.

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: graesslin, plasma-devel, kwin, #kwin

Tags: #plasma

Differential Revision:
parent f0971532
......@@ -399,6 +399,10 @@ void Scene::windowAdded(Toplevel *c)
m_windows[ c ] = w;
connect(c, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), SLOT(windowGeometryShapeChanged(KWin::Toplevel*)));
connect(c, SIGNAL(windowClosed(KWin::Toplevel*,KWin::Deleted*)), SLOT(windowClosed(KWin::Toplevel*,KWin::Deleted*)));
//A change of scale won't affect the geometry in compositor co-ordinates, but will affect the window quads.
if (c->surface()) {
connect(c->surface(), &KWayland::Server::SurfaceInterface::scaleChanged, this, std::bind(&Scene::windowGeometryShapeChanged, this, c));
Markdown is supported
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