diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:18:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:18:09 +0000 |
commit | 0cd6f26b6b8fcec2b43398fd831f6b9e0cb977e3 (patch) | |
tree | 673eec8dca4c4cfc5125dd4447f6608e589fa6b9 /browser/base/content/browser-fullScreenAndPointerLock.js | |
parent | Adding debian version 115.8.0esr-1~deb12u1. (diff) | |
download | firefox-esr-0cd6f26b6b8fcec2b43398fd831f6b9e0cb977e3.tar.xz firefox-esr-0cd6f26b6b8fcec2b43398fd831f6b9e0cb977e3.zip |
Merging upstream version 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"); }, }; |