Fix: Linux tray quit and zombie icons (#24)
* Fix: Linux tray quit and zombie icons (#23) - Add before-quit handler to set isQuitting flag - Change pgrep -x to pgrep -xi for case-insensitive matching on Linux - Add antigravity-manager to self-kill exclusion filter - Destroy existing tray before creating new one in initTray() - Destroy tray in will-quit handler - Export destroyTray function for cleanup Fixes #23 Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix: Address code review feedback - Add icon validation before creating tray (isEmpty check) - Add try/catch around tray.destroy() calls for error handling - Add try/catch around destroyTray() in will-quit handler - Add explicit !manager check in Linux process filter for defensive coding Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Jirka <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]>
This commit is contained in:
3 files changed
+51
-6
No files matched your search
+11
-1
@@ -14,7 +14,7 @@ import { CloudMonitorService } from './services/CloudMonitorService';
|
||||
// Static Imports to fix Bundle Resolution Errors
|
||||
import { AuthServer } from './ipc/cloud/authServer';
|
||||
import { bootstrapNestServer, stopNestServer } from './server/main';
|
||||
import { initTray, setTrayLanguage } from './ipc/tray/handler';
|
||||
import { initTray, setTrayLanguage, destroyTray } from './ipc/tray/handler';
|
||||
import { rpcHandler } from './ipc/handler';
|
||||
import { ConfigManager } from './ipc/config/manager';
|
||||
|
||||
@@ -149,8 +149,18 @@ app.on('child-process-gone', (event, details) => {
|
||||
logger.error('Child process gone:', details);
|
||||
});
|
||||
|
||||
app.on('before-quit', () => {
|
||||
isQuitting = true;
|
||||
logger.info('App before-quit event triggered - isQuitting set to true');
|
||||
});
|
||||
|
||||
app.on('will-quit', (event) => {
|
||||
logger.info('App will quit event triggered');
|
||||
try {
|
||||
destroyTray();
|
||||
} catch (err) {
|
||||
logger.error('Failed to destroy tray during will-quit', err);
|
||||
}
|
||||
});
|
||||
|
||||
app.on('quit', (event, exitCode) => {
|
||||
|
||||
Reference in new issue
Block a user