summaryrefslogtreecommitdiffstats
path: root/browser/base/content/browser-fullScreenAndPointerLock.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:18:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:18:09 +0000
commit0cd6f26b6b8fcec2b43398fd831f6b9e0cb977e3 (patch)
tree673eec8dca4c4cfc5125dd4447f6608e589fa6b9 /browser/base/content/browser-fullScreenAndPointerLock.js
parentAdding debian version 115.8.0esr-1~deb12u1. (diff)
downloadfirefox-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.js13
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");
},
};