From e3e28a3c37174109fcd53627ebabfddce34afd35 Mon Sep 17 00:00:00 2001 From: Nicholas Sherlock Date: Fri, 25 Sep 2015 00:59:54 +1200 Subject: [PATCH] Make joystick window always-on-top to avoid Chrome scheduling penalty Chrome severely reduces the interval of setInterval() calls when a window is completely hidden (e.g. behind the main Configurator window). This causes rx loss / failsafe detection to trigger when using the RX_MSP joysticks --- manifest.json | 3 ++- tabs/receiver.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index ba921616..3051e9bd 100644 --- a/manifest.json +++ b/manifest.json @@ -31,7 +31,8 @@ "fileSystem", "fileSystem.write", "fileSystem.retainEntries", - "notifications" + "notifications", + "alwaysOnTopWindows" ], "optional_permissions": [ diff --git a/tabs/receiver.js b/tabs/receiver.js index 019c3465..3c104b08 100644 --- a/tabs/receiver.js +++ b/tabs/receiver.js @@ -324,7 +324,8 @@ TABS.receiver.initialize = function (callback) { minWidth: windowWidth, minHeight: windowHeight, width: windowWidth, height: windowHeight, maxWidth: windowWidth, maxHeight: windowHeight - } + }, + alwaysOnTop: true }, function(createdWindow) { // Give the window a callback it can use to send the channels (otherwise it can't see those objects) createdWindow.contentWindow.setRawRx = function(channels) {