mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-22 18:30:09 +00:00
fix(electron): restore hidden window on taskbar click
Fixes #6042 where app wouldn't launch from taskbar when minimize to tray was enabled. The second-instance handler now uses showOrFocus() which properly handles both hidden and minimized windows, matching the behavior of the tray icon click handler.
This commit is contained in:
parent
e3b78c9c0c
commit
fa8bad6292
1 changed files with 2 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ import { App, BrowserWindow } from 'electron';
|
|||
import { log } from 'electron-log/main';
|
||||
import * as path from 'path';
|
||||
import { IPC } from './shared-with-frontend/ipc-events.const';
|
||||
import { showOrFocus } from './various-shared';
|
||||
|
||||
export const PROTOCOL_NAME = 'superproductivity';
|
||||
export const PROTOCOL_PREFIX = `${PROTOCOL_NAME}://`;
|
||||
|
|
@ -89,8 +90,7 @@ export const initializeProtocolHandling = (
|
|||
|
||||
// Someone tried to run a second instance, we should focus our window instead.
|
||||
if (mainWin) {
|
||||
if (mainWin.isMinimized()) mainWin.restore();
|
||||
mainWin.focus();
|
||||
showOrFocus(mainWin);
|
||||
}
|
||||
|
||||
// Handle protocol url from second instance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue