mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-18 00:56:38 +00:00
changed "maximize" window button to fullscreen instead
- this closes #46
This commit is contained in:
parent
35fb2c45ec
commit
f39b6486bf
@ -19,6 +19,18 @@ function attachListeners() {
|
|||||||
$('#continueReplaceApp').on('click', continueReplaceApp);
|
$('#continueReplaceApp').on('click', continueReplaceApp);
|
||||||
$('#quitGameButton').on('click', stopGame);
|
$('#quitGameButton').on('click', stopGame);
|
||||||
$(window).resize(fullscreenNaclModule);
|
$(window).resize(fullscreenNaclModule);
|
||||||
|
chrome.app.window.current().onMaximized.addListener(fullscreenChromeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function fullscreenChromeWindow() {
|
||||||
|
// when the user clicks the maximize button on the window,
|
||||||
|
// FIRST restore it to the previous size, then fullscreen it to the whole screen
|
||||||
|
// this prevents the previous window size from being 'maximized',
|
||||||
|
// and allows us to functionally retain two window sizes
|
||||||
|
// so that when the user hits `esc`, they go back to the "restored" size,
|
||||||
|
// instead of "maximized", which would immediately go to fullscreen
|
||||||
|
chrome.app.window.current().restore();
|
||||||
|
chrome.app.window.current().fullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
function snackbarLog(givenMessage) {
|
function snackbarLog(givenMessage) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user