diff --git a/applets/notifications/lib/notificationsapplet.cpp b/applets/notifications/lib/notificationsapplet.cpp --- a/applets/notifications/lib/notificationsapplet.cpp +++ b/applets/notifications/lib/notificationsapplet.cpp @@ -49,10 +49,9 @@ connect(containment(), &Plasma::Containment::screenChanged, this, &NotificationsApplet::onScreenChanges); - // This is to handle when eg. panel gets moved on screen - // to a different screen edge - connect(KWindowSystem::self(), &KWindowSystem::workAreaChanged, - this, &NotificationsApplet::onScreenChanges); + Q_ASSERT(containment()); + Q_ASSERT(containment()->corona()); + connect(containment()->corona(), &Plasma::Corona::availableScreenRectChanged, this, &NotificationsApplet::onScreenChanges); Plasma::Applet::init(); diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp --- a/shell/shellcorona.cpp +++ b/shell/shellcorona.cpp @@ -1049,8 +1049,8 @@ } Q_ASSERT(m_desktopViewforId.value(idx) == desktopView); - delete desktopView; m_desktopViewforId.remove(idx); + delete desktopView; } PanelView *ShellCorona::panelView(Plasma::Containment *containment) const