mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Moonlight's fullscreen requests generally conflict with what ChromeOS is trying to do automatically for the app, especially when using tablet mode. Just remove it for now and let the OS handle fullscreen.
25 lines
584 B
JavaScript
25 lines
584 B
JavaScript
const windowId = "1337";
|
|
function createWindow(state) {
|
|
chrome.app.window.create('index.html', {
|
|
state: "normal",
|
|
id: windowId,
|
|
});
|
|
}
|
|
|
|
chrome.app.runtime.onLaunched.addListener(function() {
|
|
console.log('Chrome app runtime launched.');
|
|
var windowState = 'normal';
|
|
|
|
if (chrome.storage) {
|
|
// load stored window state
|
|
chrome.storage.sync.get('windowState', function(item) {
|
|
windowState = (item && item.windowState) ?
|
|
item.windowState :
|
|
windowState;
|
|
createWindow(windowState);
|
|
});
|
|
} else {
|
|
createWindow(windowState);
|
|
}
|
|
});
|