From e44f66bc99ba01b7548d21e1f6e587980cfca9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Mon, 17 Aug 2026 13:04:15 +0200 Subject: [PATCH] [client] Keep the UI alive after the last window is destroyed Since windows are destroyed on close instead of hidden, closing the main window empties the Wails window map and the default quit-on-last-window behavior exits the whole tray app on Windows and Linux. Disable it on both platforms; macOS is already covered by ApplicationShouldTerminateAfterLastWindowClosed: false. --- client/ui/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/ui/main.go b/client/ui/main.go index 6d2ac0bbd..43ac0e5da 100644 --- a/client/ui/main.go +++ b/client/ui/main.go @@ -277,10 +277,12 @@ func newApplication(onSecondInstance func()) *application.App { ActivationPolicy: application.ActivationPolicyAccessory, }, Linux: application.LinuxOptions{ - ProgramName: "netbird", + ProgramName: "netbird", + DisableQuitOnLastWindowClosed: true, }, Windows: application.WindowsOptions{ - WndProcInterceptor: endSessionInterceptor(), + WndProcInterceptor: endSessionInterceptor(), + DisableQuitOnLastWindowClosed: true, }, SingleInstance: &application.SingleInstanceOptions{ UniqueID: "io.netbird.ui",