mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 10:38:55 +00:00
Fix obsession with Mac
This commit is contained in:
parent
d818f6cfaa
commit
26ce134de8
@ -17,7 +17,10 @@ const ZOOM_INTERVAL = 0.1;
|
|||||||
* @param {electron.app.dock.setBadge} setDockBadge
|
* @param {electron.app.dock.setBadge} setDockBadge
|
||||||
* @returns {electron.BrowserWindow}
|
* @returns {electron.BrowserWindow}
|
||||||
*/
|
*/
|
||||||
function createMainWindow(options, onAppQuit, setDockBadge) {
|
function createMainWindow(options, {quit: onAppQuit, dock}) {
|
||||||
|
if(dock){
|
||||||
|
setDockBadge = dock.setBadge
|
||||||
|
}
|
||||||
var mainWindowState = windowStateKeeper({
|
var mainWindowState = windowStateKeeper({
|
||||||
defaultWidth: options.width || 1280,
|
defaultWidth: options.width || 1280,
|
||||||
defaultHeight: options.height || 800
|
defaultHeight: options.height || 800
|
||||||
|
@ -46,7 +46,7 @@ app.on('before-quit', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.on('ready', 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) {
|
app.on('login', function(event, webContents, request, authInfo, callback) {
|
||||||
@ -59,6 +59,6 @@ ipcMain.on('notification', function(event, title, opts) {
|
|||||||
if (!isOSX() || mainWindow.isFocused()) {
|
if (!isOSX() || mainWindow.isFocused()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log(isOSX());
|
||||||
app.dock.setBadge('●');
|
app.dock.setBadge('●');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user