[gnome-shell/gnome-42] screenShield: Only wake up screen when active
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-42] screenShield: Only wake up screen when active
- Date: Thu, 11 Aug 2022 12:43:05 +0000 (UTC)
commit 8bde15ffb436ebee542ad8044cb0f0950f6a633b
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Aug 9 12:55:16 2022 +0200
screenShield: Only wake up screen when active
We treat wake up requests the same as user activity, as in general
the two behave the same: Turn on the screen and reset the idle watch
until the system becomes idle again.
The big exception is when the screen isn't locked yet. In that case
user activity should interrupt the automatic screen lock, but a
request to wake-up the screen (like showing a notification) should
not.
Address this by ignoring wake-up requests while the screen shield
isn't active, as we can expect the screen to still be turned on at
that point.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5719
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2413>
(cherry picked from commit 864606ae9d27ba02eb87664720b5695569896204)
js/ui/screenShield.js | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index be6a72190e..1dba1a812e 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -509,6 +509,8 @@ var ScreenShield = class {
}
_wakeUpScreen() {
+ if (!this.active)
+ return; // already woken up, or not yet asleep
this._onUserBecameActive();
this.emit('wake-up-screen');
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]