From 45f96e653712a8bfe9e7e3500ef4ba68856366bf Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Wed, 26 Jun 2019 16:09:14 -0400 Subject: [PATCH] Give macOS an extra 300ms to open and fullscreen a webview --- app/lib/display/index.js | 10 +++++++--- app/lib/display/index.js.map | 2 +- cli/lib/display/index.js | 10 +++++++--- cli/lib/display/index.js.map | 2 +- lib/display/index.js | 10 +++++++--- lib/display/index.js.map | 2 +- src/display/index.ts | 12 +++++++++--- 7 files changed, 33 insertions(+), 15 deletions(-) diff --git a/app/lib/display/index.js b/app/lib/display/index.js index 412543a..e6ff0bd 100644 --- a/app/lib/display/index.js +++ b/app/lib/display/index.js @@ -17,7 +17,7 @@ function padded_frame(i) { return str; } class WebView { - constructor() { + constructor(platform) { this.opened = false; this.showing = false; this.digitalWindow = new BrowserWindow({ @@ -39,7 +39,8 @@ class WebView { this.digitalWindow = null; this.close(); }); - this.digitalWindow.hide(); + //this.digitalWindow.hide(); + this.platform = platform; } async open() { this.digitalWindow.show(); @@ -47,6 +48,9 @@ class WebView { this.opened = true; await this.digitalWindow.setFullScreen(true); await delay_1.delay(300); + if (this.platform === 'osx') { + await delay_1.delay(300); //give macs an extra 300ms to open fullscreen + } } async show(src) { if (!this.digitalWindow) { @@ -150,7 +154,7 @@ class Display { async open() { //if (this.platform !== 'nix') { if (!this.wv || !this.wv.opened) { - this.wv = new WebView(); + this.wv = new WebView(this.platform); await this.wv.open(); } //} else { diff --git a/app/lib/display/index.js.map b/app/lib/display/index.js.map index 87e9a50..c2bbceb 100644 --- a/app/lib/display/index.js.map +++ b/app/lib/display/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;IAGI;AAEJ,+BAAgC;AAChC,+BAAwC;AACxC,iCAA8B;AAG9B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE9C,SAA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MAAM,EAAE,UAAU,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC;QAE3D,gCAAgC;QAC/B,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7B,UAAU;QACT,+BAA+B;QAChC,GAAG;IACJ,CAAC;IACM,KAAK,CAAC,QAAQ,CAAE,OAAgB;QACtC,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACM,IAAI;QACV,gCAAgC;QAC/B,2BAA2B;QAC3B,iBAAiB;QAClB,UAAU;QACT,kBAAkB;QACnB,GAAG;IACJ,CAAC;IACM,KAAK;QACX,gCAAgC;QAC/B,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAA;QAChB,UAAU;QACT,kBAAkB;QACnB,GAAG;IACJ,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS;IACnC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;IAGI;AAEJ,+BAAgC;AAChC,+BAAwC;AACxC,iCAA8B;AAG9B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE9C,SAAS,YAAY,CAAE,CAAU;IAChC,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,EA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QAErB,gCAAgC;QAC/B,GAAG,GAAG,KAAK,CAAC;QACb,GAAG;QAEH,OAAO,GAAG,WAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC;QAE3D,gCAAgC;QAC/B,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7B,UAAU;QACT,+BAA+B;QAChC,GAAG;IACJ,CAAC;IACM,KAAK,CAAC,QAAQ,CAAE,OAAgB;QACtC,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACM,IAAI;QACV,gCAAgC;QAC/B,2BAA2B;QAC3B,iBAAiB;QAClB,UAAU;QACT,kBAAkB;QACnB,GAAG;IACJ,CAAC;IACM,KAAK;QACX,gCAAgC;QAC/B,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAA;QAChB,UAAU;QACT,kBAAkB;QACnB,GAAG;IACJ,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS;IACnC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC,CAAA"} \ No newline at end of file diff --git a/cli/lib/display/index.js b/cli/lib/display/index.js index 412543a..e6ff0bd 100644 --- a/cli/lib/display/index.js +++ b/cli/lib/display/index.js @@ -17,7 +17,7 @@ function padded_frame(i) { return str; } class WebView { - constructor() { + constructor(platform) { this.opened = false; this.showing = false; this.digitalWindow = new BrowserWindow({ @@ -39,7 +39,8 @@ class WebView { this.digitalWindow = null; this.close(); }); - this.digitalWindow.hide(); + //this.digitalWindow.hide(); + this.platform = platform; } async open() { this.digitalWindow.show(); @@ -47,6 +48,9 @@ class WebView { this.opened = true; await this.digitalWindow.setFullScreen(true); await delay_1.delay(300); + if (this.platform === 'osx') { + await delay_1.delay(300); //give macs an extra 300ms to open fullscreen + } } async show(src) { if (!this.digitalWindow) { @@ -150,7 +154,7 @@ class Display { async open() { //if (this.platform !== 'nix') { if (!this.wv || !this.wv.opened) { - this.wv = new WebView(); + this.wv = new WebView(this.platform); await this.wv.open(); } //} else { diff --git a/cli/lib/display/index.js.map b/cli/lib/display/index.js.map index 87e9a50..c2bbceb 100644 --- a/cli/lib/display/index.js.map +++ b/cli/lib/display/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;IAGI;AAEJ,+BAAgC;AAChC,+BAAwC;AACxC,iCAA8B;AAG9B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE9C,SAAS,YAAY,CAAE,CAAU;IAChC,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC;IAC1B,IAAI,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACjC,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;KAChB;IACD,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,MAAM,OAAO;IAIZ;QAFO,WAAM,GAAa,KAAK,CAAC;QACzB,YAAO,GAAa,KAAK,CAAC;QAEhC,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC;YACtC,cAAc,EAAE;gBACV,eAAe,EAAE,IAAI;gBACrB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,kBAAkB;QACnB,GAAG;IACJ,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS;IACnC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;IAGI;AAEJ,+BAAgC;AAChC,+BAAwC;AACxC,iCAA8B;AAG9B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE9C,SAAS,YAAY,CAAE,CAAU;IAChC,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC;IAC1B,IAAI,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACjC,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;KAChB;IACD,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,MAAM,OAAO;IAMZ,YAAa,QAAiB;QAJvB,WAAM,GAAa,KAAK,CAAC;QACzB,YAAO,GAAa,KAAK,CAAC;QAIhC,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC;YACtC,cAAc,EAAE;gBACV,eAAe,EAAE,IAAI;gBACrB,2BAA2B,EAAE,KAAK;aACpC;YACJ,KAAK,EAAE,GAAG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ACJ,CAAC;IACM,KAAK;QACX,gCAAgC;QAC/B,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAA;QAChB,UAAU;QACT,kBAAkB;QACnB,GAAG;IACJ,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS;IACnC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC,CAAA"} \ No newline at end of file diff --git a/lib/display/index.js b/lib/display/index.js index 412543a..e6ff0bd 100644 --- a/lib/display/index.js +++ b/lib/display/index.js @@ -17,7 +17,7 @@ function padded_frame(i) { return str; } class WebView { - constructor() { + constructor(platform) { this.opened = false; this.showing = false; this.digitalWindow = new BrowserWindow({ @@ -39,7 +39,8 @@ class WebView { this.digitalWindow = null; this.close(); }); - this.digitalWindow.hide(); + //this.digitalWindow.hide(); + this.platform = platform; } async open() { this.digitalWindow.show(); @@ -47,6 +48,9 @@ class WebView { this.opened = true; await this.digitalWindow.setFullScreen(true); await delay_1.delay(300); + if (this.platform === 'osx') { + await delay_1.delay(300); //give macs an extra 300ms to open fullscreen + } } async show(src) { if (!this.digitalWindow) { @@ -150,7 +154,7 @@ class Display { async open() { //if (this.platform !== 'nix') { if (!this.wv || !this.wv.opened) { - this.wv = new WebView(); + this.wv = new WebView(this.platform); await this.wv.open(); } //} else { diff --git a/lib/display/index.js.map b/lib/display/index.js.map index 87e9a50..c2bbceb 100644 --- a/lib/display/index.js.map +++ b/lib/display/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sour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AAY,YAAY,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,GAAG,GAAY,KAAK,CAAC;QACzB,IAAI,OAAgB,CAAC;QAErB,gCAAgC;QAC/B,GAAG,GAAG,KAAK,CAAC;QACb,GAAG;QAEH,OAAO,GAAG,WAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC;QAE3D,gCAAgC;QAC/B,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7B,UAAU;QACT,+BAA+B;QAChC,GAAG;IACJ,CAAC;IACM,KAAK,CAAC,QAAQ,CAAE,OAAgB;QACtC,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACM,IAAI;QACV,gCAAgC;QAC/B,2BAA2B;QAC3B,iBAAiB;QAClB,UAAU;QACT,kBAAkB;QACnB,GAAG;IACJ,CAAC;IACM,KAAK;QACX,gCAAgC;QAC/B,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAA;QAChB,UAAU;QACT,kBAAkB;QACnB,GAAG;IACJ,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS;IACnC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb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A"} \ No newline at end of file diff --git a/src/display/index.ts b/src/display/index.ts index 3f0c7c8..480c1a5 100644 --- a/src/display/index.ts +++ b/src/display/index.ts @@ -25,7 +25,9 @@ class WebView { private digitalWindow : any; public opened : boolean = false; public showing : boolean = false; - constructor() { + private platform : string; + + constructor (platform : string) { this.digitalWindow = new BrowserWindow({ webPreferences: { nodeIntegration: true, @@ -45,7 +47,8 @@ class WebView { this.digitalWindow = null; this.close(); }); - this.digitalWindow.hide(); + //this.digitalWindow.hide(); + this.platform = platform; } async open () { this.digitalWindow.show(); @@ -53,6 +56,9 @@ class WebView { this.opened = true; await this.digitalWindow.setFullScreen(true); await delay(300); + if (this.platform === 'osx') { + await delay(300); //give macs an extra 300ms to open fullscreen + } } async show (src : string) { if (!this.digitalWindow) { @@ -164,7 +170,7 @@ class Display { public async open () { //if (this.platform !== 'nix') { if (!this.wv || !this.wv.opened) { - this.wv = new WebView(); + this.wv = new WebView(this.platform); await this.wv.open() } //} else {