diff options
Diffstat (limited to 'ui/ui.go')
-rw-r--r-- | ui/ui.go | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,6 +1,6 @@ /* SPDX-License-Identifier: MIT * - * Copyright (C) 2019 WireGuard LLC. All Rights Reserved. + * Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved. */ package ui @@ -20,9 +20,12 @@ import ( "golang.zx2c4.com/wireguard/windows/version" ) -var noTrayAvailable = false -var shouldQuitManagerWhenExiting = false -var startTime = time.Now() +var ( + noTrayAvailable = false + shouldQuitManagerWhenExiting = false + startTime = time.Now() + IsAdmin = false // A global, because this really is global for the process +) func RunUI() { runtime.LockOSThread() @@ -72,7 +75,7 @@ func RunUI() { switch updateState { case manager.UpdateStateFoundUpdate: mtw.UpdateFound() - if tray != nil { + if tray != nil && IsAdmin { tray.UpdateFound() } case manager.UpdateStateUpdatesDisabledUnofficialBuild: |