From 58cf109a836c0c31baf1da6c37c1311a96f5e6be Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 25 Apr 2019 13:29:11 -0500 Subject: [PATCH] Fix full screen detection for Chromium --- packages/ide/src/fill/electron.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/ide/src/fill/electron.ts b/packages/ide/src/fill/electron.ts index 03901ac2..dc74d244 100644 --- a/packages/ide/src/fill/electron.ts +++ b/packages/ide/src/fill/electron.ts @@ -394,9 +394,15 @@ class BrowserWindow extends EventEmitter { if (typeof (window as any)["fullScreen"] !== "undefined") { return (window as any)["fullScreen"]; } - // tslint:enable no-any - return false; + + try { + return window.matchMedia("(display-mode: fullscreen)").matches; + } catch (error) { + logger.error(error.message); + + return false; + } } public isFocused(): boolean {