2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-23 02:28:55 +00:00

Fix obsession with Mac

This commit is contained in:
zweicoder 2016-01-23 15:10:02 +08:00
parent d818f6cfaa
commit 26ce134de8
2 changed files with 6 additions and 3 deletions

View File

@ -17,7 +17,10 @@ const ZOOM_INTERVAL = 0.1;
* @param {electron.app.dock.setBadge} setDockBadge
* @returns {electron.BrowserWindow}
*/
function createMainWindow(options, onAppQuit, setDockBadge) {
function createMainWindow(options, {quit: onAppQuit, dock}) {
if(dock){
setDockBadge = dock.setBadge
}
var mainWindowState = windowStateKeeper({
defaultWidth: options.width || 1280,
defaultHeight: options.height || 800

View File

@ -46,7 +46,7 @@ app.on('before-quit', function () {
});
app.on('ready', function () {
mainWindow = createMainWindow(appArgs, app.quit, app.dock.setBadge);
mainWindow = createMainWindow(appArgs, app);
});
app.on('login', function(event, webContents, request, authInfo, callback) {
@ -59,6 +59,6 @@ ipcMain.on('notification', function(event, title, opts) {
if (!isOSX() || mainWindow.isFocused()) {
return;
}
console.log(isOSX());
app.dock.setBadge('●');
});