[gnome-shell/gnome-40] screenShield: Close inhibitors that finished creation after uninhibition
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-40] screenShield: Close inhibitors that finished creation after uninhibition
- Date: Mon, 16 Aug 2021 00:44:56 +0000 (UTC)
commit 1b8976bf303d60fb69c6ef1bd682c4f9b68fb0d4
Author: Sebastian Keller <skeller gnome org>
Date: Thu Aug 5 07:22:07 2021 +0200
screenShield: Close inhibitors that finished creation after uninhibition
There was a potential issue when suspend was inhibited and immediately
uninhibited again before the creation of the inhibitor has finished.
Then the new inhibitor would be kept active.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1927>
(cherry picked from commit 85075192f34060c20ed99271a73145d75b4a5e49)
js/ui/screenShield.js | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 426e635772..efdf3bb26a 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -224,6 +224,12 @@ var ScreenShield = class {
else
this._inhibitor = inhibitor;
}
+
+ // Handle uninhibits that happened after the start
+ if (!this._inhibited) {
+ this._inhibitor?.close(null);
+ this._inhibitor = null;
+ }
});
} else {
this._inhibitor?.close(null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]