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>
This commit is contained in:
parent
fb313033ea
commit
85075192f3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user