focus() visible window on show-window instead of show() (#1455)
When clicking on a notification in Windows when a window had been stuck to one side of the screen using Snap, the window would be repositioned. Fixes #1453 FREEBIE
This commit is contained in:
parent
db869c6ce4
commit
272955b9d6
1 changed files with 9 additions and 1 deletions
8
main.js
8
main.js
|
@ -146,7 +146,15 @@ function createWindow () {
|
||||||
});
|
});
|
||||||
|
|
||||||
ipc.on('show-window', function() {
|
ipc.on('show-window', function() {
|
||||||
|
// Using focus() instead of show() seems to be important on Windows when our window
|
||||||
|
// has been docked using Aero Snap/Snap Assist. A full .show() call here will cause
|
||||||
|
// the window to reposition:
|
||||||
|
// https://github.com/WhisperSystems/Signal-Desktop/issues/1429
|
||||||
|
if (mainWindow.isVisible()) {
|
||||||
|
mainWindow.focus();
|
||||||
|
} else {
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue