From a537572d421ce50e57f98fa4ad579bd75d5d7d90 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 1 Aug 2017 00:37:37 +0300 Subject: [PATCH] fix #643,protect enabledBorders for InfoView --- app/infoview.cpp | 9 +++++---- shell/package/contents/views/InfoView.qml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/infoview.cpp b/app/infoview.cpp index 07342f12b..6e3ee54df 100644 --- a/app/infoview.cpp +++ b/app/infoview.cpp @@ -60,20 +60,18 @@ InfoView::InfoView(DockCorona *corona, QString message, QScreen *screen, QWindow InfoView::~InfoView() { + PanelShadows::self()->removeWindow(this); + qDebug() << "InfoView deleting ..."; if (m_shellSurface) { delete m_shellSurface; m_shellSurface = nullptr; } - } void InfoView::init() { - PanelShadows::self()->addWindow(this); - PanelShadows::self()->setEnabledBorders(this, m_borders); - rootContext()->setContextProperty(QStringLiteral("infoWindow"), this); KDeclarative::KDeclarative kdeclarative; @@ -129,6 +127,9 @@ void InfoView::showEvent(QShowEvent *ev) syncGeometry(); QTimer::singleShot(400, this, &InfoView::syncGeometry); + + PanelShadows::self()->addWindow(this); + PanelShadows::self()->setEnabledBorders(this, m_borders); } void InfoView::setupWaylandIntegration() diff --git a/shell/package/contents/views/InfoView.qml b/shell/package/contents/views/InfoView.qml index 5b70ed630..3ff425f1e 100644 --- a/shell/package/contents/views/InfoView.qml +++ b/shell/package/contents/views/InfoView.qml @@ -32,7 +32,7 @@ PlasmaCore.FrameSvgItem { imagePath: "widgets/panel-background" prefix:"" - enabledBorders: infoWindow.enabledBorders + enabledBorders: infoWindow ? infoWindow.enabledBorders : 0 width: Screen.width + 1 height: Math.min(Screen.height - units.gridUnit * 8, logo.height + messageLbl.height + 2 *units.gridUnit)