Send window activation from tray icon as well
This commit is contained in:
parent
5901b79e10
commit
5a191b2e49
1 changed files with 1 additions and 2 deletions
|
@ -995,6 +995,7 @@ async function createWindow() {
|
||||||
|
|
||||||
mainWindow.on('show', () => {
|
mainWindow.on('show', () => {
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
|
mainWindow.webContents.send('activate');
|
||||||
mainWindow.webContents.send('set-media-playback-disabled', false);
|
mainWindow.webContents.send('set-media-playback-disabled', false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1019,7 +1020,6 @@ async function createWindow() {
|
||||||
|
|
||||||
if (shouldShowWindow) {
|
if (shouldShowWindow) {
|
||||||
getLogger().info('showing main window');
|
getLogger().info('showing main window');
|
||||||
mainWindow.webContents.send('activate');
|
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2560,7 +2560,6 @@ app.on('activate', () => {
|
||||||
// On OS X it's common to re-create a window in the app when the
|
// On OS X it's common to re-create a window in the app when the
|
||||||
// dock icon is clicked and there are no other windows open.
|
// dock icon is clicked and there are no other windows open.
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
mainWindow.webContents.send('activate');
|
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
} else {
|
} else {
|
||||||
drop(createWindow());
|
drop(createWindow());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue