mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 02:08:57 +00:00
Send window activation from tray icon as well
This commit is contained in:
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user