diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:18:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:18:07 +0000 |
commit | 328078c4d259e52db1a4848c00ee0b420775c91c (patch) | |
tree | ca9b0e61a1c03f0246b0371423bbbe570193e2f1 /browser/base/content/browser-fullScreenAndPointerLock.js | |
parent | Adding upstream version 115.8.0esr. (diff) | |
download | firefox-esr-328078c4d259e52db1a4848c00ee0b420775c91c.tar.xz firefox-esr-328078c4d259e52db1a4848c00ee0b420775c91c.zip |
Adding upstream version 115.9.0esr.upstream/115.9.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/browser-fullScreenAndPointerLock.js')
-rw-r--r-- | browser/base/content/browser-fullScreenAndPointerLock.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/browser/base/content/browser-fullScreenAndPointerLock.js b/browser/base/content/browser-fullScreenAndPointerLock.js index 82d5727f14..cc5fefff68 100644 --- a/browser/base/content/browser-fullScreenAndPointerLock.js +++ b/browser/base/content/browser-fullScreenAndPointerLock.js @@ -275,11 +275,24 @@ var PointerlockFsWarning = { }; var PointerLock = { + _isActive: false, + + /** + * @returns {boolean} - true if pointer lock is currently active for the + * associated window. + */ + get isActive() { + return this._isActive; + }, + entered(originNoSuffix) { + this._isActive = true; + Services.obs.notifyObservers(null, "pointer-lock-entered"); PointerlockFsWarning.showPointerLock(originNoSuffix); }, exited() { + this._isActive = false; PointerlockFsWarning.close("pointerlock-warning"); }, }; |