mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-20 22:27:31 +09:00
[PALEMOON] Align the application with the updated fullscreen API
This commit is contained in:
parent
211c4325ba
commit
4656ff95ec
2 changed files with 4 additions and 8 deletions
|
|
@ -6,13 +6,9 @@
|
||||||
var FullScreen = {
|
var FullScreen = {
|
||||||
_XULNS: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
_XULNS: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||||
|
|
||||||
toggle: function (event) {
|
toggle: function () {
|
||||||
var enterFS = window.fullScreen;
|
var enterFS = window.fullScreen;
|
||||||
|
|
||||||
// We get the fullscreen event _before_ the window transitions into or out of FS mode.
|
|
||||||
if (event && event.type == "fullscreen")
|
|
||||||
enterFS = !enterFS;
|
|
||||||
|
|
||||||
// Toggle the View:FullScreen command, which controls elements like the
|
// Toggle the View:FullScreen command, which controls elements like the
|
||||||
// fullscreen menuitem, menubars, and the appmenu.
|
// fullscreen menuitem, menubars, and the appmenu.
|
||||||
let fullscreenCommand = document.getElementById("View:FullScreen");
|
let fullscreenCommand = document.getElementById("View:FullScreen");
|
||||||
|
|
@ -140,7 +136,7 @@ var FullScreen = {
|
||||||
},
|
},
|
||||||
|
|
||||||
cleanup: function () {
|
cleanup: function () {
|
||||||
if (window.fullScreen) {
|
if (!window.fullScreen) {
|
||||||
MousePosTracker.removeListener(this);
|
MousePosTracker.removeListener(this);
|
||||||
document.removeEventListener("keypress", this._keyToggleCallback, false);
|
document.removeEventListener("keypress", this._keyToggleCallback, false);
|
||||||
document.removeEventListener("popupshown", this._setPopupOpen, false);
|
document.removeEventListener("popupshown", this._setPopupOpen, false);
|
||||||
|
|
|
||||||
|
|
@ -2533,8 +2533,8 @@ function BrowserFullScreen()
|
||||||
window.fullScreen = !window.fullScreen;
|
window.fullScreen = !window.fullScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFullScreen(event) {
|
function onFullScreen() {
|
||||||
FullScreen.toggle(event);
|
FullScreen.toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMozEnteredDomFullscreen(event) {
|
function onMozEnteredDomFullscreen(event) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue