From be7bbfe848fe753239dcd4d9f506a70078212181 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 7 Oct 2018 21:04:21 +0300 Subject: [PATCH] dont call syncGeometry when some cases --dont call costly syncGeometry when drawShadows externally is called. In such case only updating shadows/borders is needed. --- app/dock/dockview.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/dock/dockview.cpp b/app/dock/dockview.cpp index c9321c8be..a9293f2f8 100644 --- a/app/dock/dockview.cpp +++ b/app/dock/dockview.cpp @@ -209,7 +209,13 @@ void DockView::init() connect(corona(), &Plasma::Corona::availableScreenRectChanged, this, &DockView::availableScreenRectChanged); connect(this, &DockView::behaveAsPlasmaPanelChanged, this, &DockView::syncGeometry); - connect(this, &DockView::drawShadowsChanged, this, &DockView::syncGeometry); + connect(this, &DockView::drawShadowsChanged, this, [&]() { + if (!m_behaveAsPlasmaPanel) { + syncGeometry(); + } else { + updateEnabledBorders(); + } + }); connect(this, &DockView::maxLengthChanged, this, &DockView::syncGeometry); connect(this, &DockView::offsetChanged, this, &DockView::syncGeometry); connect(this, &DockView::alignmentChanged, this, &DockView::updateEnabledBorders);