Handle buffer scales changing dynamically
Summary: 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 scale. 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: https://phabricator.kde.org/D7486
This commit is contained in:
parent
f0971532c9
commit
95c983e6d8
1 changed files with 4 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
c->effectWindow()->setSceneWindow(w);
|
||||
c->getShadow();
|
||||
w->updateShadow(c->shadow());
|
||||
|
|
Loading…
Reference in a new issue