This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * There may be a better way to do this and I'd love to hear of them. This technique revolves around 2 specifics: | |
| * 1. In OSX Mavericks+ you need to set the displays to not have their own "space"; I have bruted this by adding a cmd | |
| * to actually write this preference on each app start. Needless to say this should NOT be done to an unsuspecting user... | |
| * 2. Kiosk mode should be set BEFORE setting the width and height of your window. Below I include a function that will calculate | |
| * all available space and position the window relatively to the "main" screen. | |
| */ | |
| // require the GUI object so that we can access Window and Screen | |
| var gui = require("nw.gui"); |