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
10
main.js
10
main.js
|
@ -146,7 +146,15 @@ function createWindow () {
|
|||
});
|
||||
|
||||
ipc.on('show-window', function() {
|
||||
mainWindow.show();
|
||||
// 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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue