Fix full screen detection for Chromium
This commit is contained in:
parent
fab45dedcd
commit
58cf109a83
@ -394,10 +394,16 @@ class BrowserWindow extends EventEmitter {
|
|||||||
if (typeof (window as any)["fullScreen"] !== "undefined") {
|
if (typeof (window as any)["fullScreen"] !== "undefined") {
|
||||||
return (window as any)["fullScreen"];
|
return (window as any)["fullScreen"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// tslint:enable no-any
|
// tslint:enable no-any
|
||||||
|
|
||||||
|
try {
|
||||||
|
return window.matchMedia("(display-mode: fullscreen)").matches;
|
||||||
|
} catch (error) {
|
||||||
|
logger.error(error.message);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public isFocused(): boolean {
|
public isFocused(): boolean {
|
||||||
return document.hasFocus();
|
return document.hasFocus();
|
||||||
|
Reference in New Issue
Block a user