From issues-return-91913-archive-asf-public=cust-asf.ponee.io@cordova.apache.org Fri Jan 19 18:39:04 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id E0905180607 for ; Fri, 19 Jan 2018 18:39:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D08E2160C1B; Fri, 19 Jan 2018 17:39:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 206A7160C36 for ; Fri, 19 Jan 2018 18:39:03 +0100 (CET) Received: (qmail 58844 invoked by uid 500); 19 Jan 2018 17:39:03 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 58832 invoked by uid 99); 19 Jan 2018 17:39:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jan 2018 17:39:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A976D1A06B1 for ; Fri, 19 Jan 2018 17:39:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.211 X-Spam-Level: X-Spam-Status: No, score=-100.211 tagged_above=-999 required=6.31 tests=[KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id PjBqdU1mYa8E for ; Fri, 19 Jan 2018 17:39:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 640CD5F27E for ; Fri, 19 Jan 2018 17:39:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E0B14E0373 for ; Fri, 19 Jan 2018 17:39:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A0FDD20EA9 for ; Fri, 19 Jan 2018 17:39:00 +0000 (UTC) Date: Fri, 19 Jan 2018 17:39:00 +0000 (UTC) From: "Chris Brody (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CB-13802) Avoid unnecessary ApplicationView access on Windows 8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Chris Brody created CB-13802: -------------------------------- Summary: Avoid unnecessary ApplicationView access on Windows 8= .1 Key: CB-13802 URL: https://issues.apache.org/jira/browse/CB-13802 Project: Apache Cordova Issue Type: Bug Components: cordova-windows Reporter: Chris Brody Assignee: Jesse MacFadyen From changes in=C2=A0CB-12238,=C2=A0CB-12784, and=C2=A0CB-13641=C2=A0I noti= ced a few spots where {{Windows.UI.ViewManagement.ApplicationView.getForCur= rentView()}} is called for no good reason on Windows 8.1, along with a coup= le "else crash on 8.1" comments nearby. The following changes (NOT TESTED) would resolve this issue: {code:sh} diff --git a/cordova-js-src/splashscreen.js b/cordova-js-src/splashscreen.j= s index 97fd86c..77bca75 100644 --- a/cordova-js-src/splashscreen.js +++ b/cordova-js-src/splashscreen.js @@ -198,7 +198,7 @@ function enableUserInteraction() { =20 // Enter fullscreen mode function enterFullScreen() { - if (Windows.UI.ViewManagement.ApplicationViewBoundsMode) { // else cra= sh on 8.1 + if (isWin10UWP && Windows.UI.ViewManagement.ApplicationViewBoundsMode)= { var view =3D Windows.UI.ViewManagement.ApplicationView.getForCurre= ntView(); view.setDesiredBoundsMode(Windows.UI.ViewManagement.ApplicationVie= wBoundsMode.useCoreWindow); view.suppressSystemOverlays =3D true; @@ -207,7 +207,7 @@ function enterFullScreen() { =20 // Exit fullscreen mode function exitFullScreen() { - if (Windows.UI.ViewManagement.ApplicationViewBoundsMode) { // else cra= sh on 8.1 + if (isWin10UWP && Windows.UI.ViewManagement.ApplicationViewBoundsMode)= { var view =3D Windows.UI.ViewManagement.ApplicationView.getForCurre= ntView(); view.setDesiredBoundsMode(Windows.UI.ViewManagement.ApplicationVie= wBoundsMode.useVisible); view.suppressSystemOverlays =3D false; @@ -216,8 +216,10 @@ function exitFullScreen() { =20 // Make title bg color match splashscreen bg color function colorizeTitleBar() { - var appView =3D Windows.UI.ViewManagement.ApplicationView.getForCurren= tView(); if (isWin10UWP && !isBgColorTransparent) { + var appView =3D + Windows.UI.ViewManagement.ApplicationView.getForCurrentView(); + titleInitialBgColor =3D appView.titleBar.backgroundColor; =20 appView.titleBar.backgroundColor =3D titleBgColor; @@ -227,8 +229,10 @@ function colorizeTitleBar() { =20 // Revert title bg color function revertTitleBarColor() { - var appView =3D Windows.UI.ViewManagement.ApplicationView.getForCurren= tView(); if (isWin10UWP && !isBgColorTransparent) { + var appView =3D + Windows.UI.ViewManagement.ApplicationView.getForCurrentView(); + appView.titleBar.backgroundColor =3D titleInitialBgColor; appView.titleBar.buttonBackgroundColor =3D titleInitialBgColor; } {code} Unfortunately I do not know how to test splashscreen changes myself, guidan= ce would be appreciated. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org