mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
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:
@@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user