From d0ea1d77b2fbd8679687feeba123bb03b6b3dad2 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 e51dbe39c..619790670 100644 --- a/client/ui/main.go +++ b/client/ui/main.go @@ -281,10 +281,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",