"Show/Hide" tray action shows window from background instead of hiding it. (#312)

This commit is contained in:
Maxwell Clarke 2022-02-01 01:15:31 +13:00 committed by GitHub
parent 8fd24d2fa2
commit 61ed2a21c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ export function destroy(): void {
}
function toggleWin(): void {
if (global.mainWindow.isVisible() && !global.mainWindow.isMinimized()) {
if (global.mainWindow.isVisible() && !global.mainWindow.isMinimized() && global.mainWindow.isFocused()) {
global.mainWindow.hide();
} else {
if (global.mainWindow.isMinimized()) global.mainWindow.restore();