Skip to content

Commit 58cf109

Browse files
committed
Fix full screen detection for Chromium
1 parent fab45de commit 58cf109

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/ide/src/fill/electron.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,15 @@ class BrowserWindow extends EventEmitter {
394394
if (typeof (window as any)["fullScreen"] !== "undefined") {
395395
return (window as any)["fullScreen"];
396396
}
397-
398397
// tslint:enable no-any
399-
return false;
398+
399+
try {
400+
return window.matchMedia("(display-mode: fullscreen)").matches;
401+
} catch (error) {
402+
logger.error(error.message);
403+
404+
return false;
405+
}
400406
}
401407

402408
public isFocused(): boolean {

0 commit comments

Comments
 (0)