diff --git a/panels/notification/center/notificationcenterdbusadaptor.h b/panels/notification/center/notificationcenterdbusadaptor.h index cc389d8de..8c82bd82b 100644 --- a/panels/notification/center/notificationcenterdbusadaptor.h +++ b/panels/notification/center/notificationcenterdbusadaptor.h @@ -23,6 +23,9 @@ public Q_SLOTS: // methods void Show(); void Hide(); +Q_SIGNALS: + void VisibleChanged(bool visible); + private: NotificationCenterProxy *impl() const; }; diff --git a/panels/notification/center/notificationcenterproxy.cpp b/panels/notification/center/notificationcenterproxy.cpp index e65b4cf3d..bd4c5338d 100644 --- a/panels/notification/center/notificationcenterproxy.cpp +++ b/panels/notification/center/notificationcenterproxy.cpp @@ -16,6 +16,9 @@ namespace notification { NotificationCenterProxy::NotificationCenterProxy(QObject *parent) : QObject(parent) { + connect(panel(), &NotificationCenterPanel::visibleChanged, this, [this]() { + Q_EMIT VisibleChanged(panel()->visible()); + }); } NotificationCenterProxy::~NotificationCenterProxy() diff --git a/panels/notification/center/notificationcenterproxy.h b/panels/notification/center/notificationcenterproxy.h index 9fa6c3d4c..173cda86c 100644 --- a/panels/notification/center/notificationcenterproxy.h +++ b/panels/notification/center/notificationcenterproxy.h @@ -20,6 +20,9 @@ public slots: void Show(); void Hide(); +signals: + void VisibleChanged(bool visible); + private: NotificationCenterPanel *panel() const; };