Last active
October 15, 2015 15:18
-
-
Save ileonte/2d55f52121528bfd0c65 to your computer and use it in GitHub Desktop.
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
| --- main.orig.js 2015-09-28 02:40:41.000000000 +0300 | |
| +++ main.js 2015-10-15 18:04:54.150005355 +0300 | |
| @@ -63,8 +63,9 @@ app.on('ready', function() { | |
| }); | |
| //Save settings when app is closed. | |
| mainWindow.on('close', function(){ | |
| - var data = { | |
| + data = { | |
| bounds: mainWindow.getBounds(), | |
| + position: mainWindow.getPosition(), | |
| minTray: minToTray | |
| }; | |
| fs.writeFileSync(initPath, JSON.stringify(data)); | |
| @@ -76,6 +77,7 @@ app.on('ready', function() { | |
| type: 'normal', | |
| click: function() { | |
| mainWindow.setBounds(data.bounds); | |
| + mainWindow.setPosition(data.position[0], data.position[1]); | |
| mainWindow.restore(); mainWindow.setSkipTaskbar(false); | |
| } | |
| }); | |
| @@ -106,10 +108,12 @@ app.on('ready', function() { | |
| mainWindow.on('minimize', function() { | |
| //showButton.enabled = true; | |
| - var data = { | |
| + data = { | |
| bounds: mainWindow.getBounds(), | |
| + position: mainWindow.getPosition(), | |
| minTray: minToTray | |
| }; | |
| + fs.writeFileSync(initPath, JSON.stringify(data)); | |
| if(minToTray == true){ | |
| mainWindow.setSkipTaskbar(true); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment