From 4e6de4e64b7542e6123ccd63655e222e09241ba8 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 20 Jan 2025 14:19:58 +0000 Subject: [PATCH] timeLimitsManager: Activate wellbeing settings on clicking notification Signed-off-by: Philip Withnall Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8161 Part-of: --- js/misc/timeLimitsManager.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/js/misc/timeLimitsManager.js b/js/misc/timeLimitsManager.js index 20e774088..1961bbdf0 100644 --- a/js/misc/timeLimitsManager.js +++ b/js/misc/timeLimitsManager.js @@ -915,7 +915,7 @@ class TimeLimitsNotificationSource extends GObject.Object { } if (this._notification === null) { - this._notification = new TimeLimitsNotification(this._source); + this._notification = new TimeLimitsNotification(this._source, this._app); this._notification.connect('destroy', () => (this._notification = null)); } @@ -1018,10 +1018,17 @@ class TimeLimitsNotificationSource extends GObject.Object { const TimeLimitsNotification = GObject.registerClass( class TimeLimitsNotification extends MessageTray.Notification { - constructor(source) { + constructor(source, app) { super({ source, resident: true, }); + + this._app = app; + } + + activate() { + this._app.activate(); + super.activate(); } });