When I maximize a packaged app window (created using chrome.app.window.create) on Windows 8 it is maximized to full-screen (hiding the taskbar).
Is there a way for the chrome window to be maximized normally and not in full-screen ? (leaving the taskbar visible)
I realize this is somewhat outdated, but somehow the issue still persists, and I think I found a temporary solution.
You can use the chrome.system.display
API to query the usable area of the screen, and then set that as the width/height of the window:
chrome.system.display.getInfo(function(info) {
var width = info[0].workArea.width;
var height = info[0].workArea.height;
chrome.app.window.create(url, {
bounds: {
width: width,
height: height
},
});
});
chrome.system.display.getInfo()
returns an object with data regarding the display(s), inside of which the workArea
property specifies the usable height/width. Just remember to include the system.display
permission in the app manifest! You can read more here.
Definitely a hack, but it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With