Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ebdbb67

Browse files
committedApr 25, 2019
Fix full screen detection for Chromium
1 parent a19e00d commit ebdbb67

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)
Please sign in to comment.