From 1694b24fa69d4c998dc2c14f5afdc1d2a2933801 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 3 Nov 2020 13:23:13 +0200 Subject: [PATCH] Move some connects from Scene::addToplevel() to Window constructor --- scene.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scene.cpp b/scene.cpp index 5ebf381451..f2c76bb398 100644 --- a/scene.cpp +++ b/scene.cpp @@ -422,9 +422,6 @@ void Scene::addToplevel(Toplevel *c) m_windows[ c ] = w; connect(c, &Toplevel::windowClosed, this, &Scene::windowClosed); - connect(c, &Toplevel::screenScaleChanged, w, &Window::discardQuads); - connect(c, &Toplevel::shadowChanged, w, &Window::discardQuads); - connect(c, &Toplevel::geometryShapeChanged, w, &Window::discardShape); c->effectWindow()->setSceneWindow(w); c->updateShadow(); @@ -764,6 +761,10 @@ Scene::Window::Window(Toplevel *client, QObject *parent) connect(surface, &KWaylandServer::SurfaceInterface::surfaceToBufferMatrixChanged, this, &Window::discardQuads); } + + connect(toplevel, &Toplevel::screenScaleChanged, this, &Window::discardQuads); + connect(toplevel, &Toplevel::shadowChanged, this, &Window::discardQuads); + connect(toplevel, &Toplevel::geometryShapeChanged, this, &Window::discardShape); } Scene::Window::~Window()