[gnome-shell] screenShield: Close inhibitors that finished creation after uninhibition
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenShield: Close inhibitors that finished creation after uninhibition
- Date: Mon, 16 Aug 2021 00:32:58 +0000 (UTC)
commit 85075192f34060c20ed99271a73145d75b4a5e49
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>
js/ui/screenShield.js | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index de8b7f409e..04353d93b5 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]