From 69af8d0e0c04523f06b8d6487a7f90f656d89cb7 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 7 Apr 2019 19:07:24 +0300 Subject: [PATCH] fix updating lastUsedActivity properly --- app/layout/genericlayout.h | 15 ++++++++------- app/layout/toplayout.cpp | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/layout/genericlayout.h b/app/layout/genericlayout.h index aede89b89..2c0d7a5df 100644 --- a/app/layout/genericlayout.h +++ b/app/layout/genericlayout.h @@ -137,11 +137,8 @@ signals: //! to use the global shortcuts activations void preferredViewForShortcutsChanged(Latte::View *view); -private slots: - void addContainment(Plasma::Containment *containment); - void appletCreated(Plasma::Applet *applet); - void destroyedChanged(bool destroyed); - void containmentDestroyed(QObject *cont); +protected: + void updateLastUsedActivity(); protected: Latte::Corona *m_corona{nullptr}; @@ -151,9 +148,13 @@ protected: QHash m_latteViews; QHash m_waitingLatteViews; -private: - void updateLastUsedActivity(); +private slots: + void addContainment(Plasma::Containment *containment); + void appletCreated(Plasma::Applet *applet); + void destroyedChanged(bool destroyed); + void containmentDestroyed(QObject *cont); +private: //! It can be used in order for LatteViews to not be created automatically when //! their corresponding containments are created e.g. copyView functionality bool blockAutomaticLatteViewCreation() const; diff --git a/app/layout/toplayout.cpp b/app/layout/toplayout.cpp index c6f159469..48880b346 100644 --- a/app/layout/toplayout.cpp +++ b/app/layout/toplayout.cpp @@ -59,6 +59,8 @@ void TopLayout::addActiveLayout(ActiveLayout *layout) connect(layout, &GenericLayout::activitiesChanged, this, &GenericLayout::activitiesChanged); emit activitiesChanged(); emit viewsCountChanged(); + + updateLastUsedActivity(); } }