aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-09-16 23:36:49 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-09-23 15:29:18 +0200
commit5878d9a6b2251e5a0c464cb427a5eac7d1ada6e5 (patch)
tree1f123998f801c375674326ba7946da568be32df0 /ui
parentupdater: use correct length for security attributes (diff)
downloadwireguard-windows-5878d9a6b2251e5a0c464cb427a5eac7d1ada6e5.tar.xz
wireguard-windows-5878d9a6b2251e5a0c464cb427a5eac7d1ada6e5.zip
global: use SECURITY_DESCRIPTOR apis from x/sys/windows
Diffstat (limited to 'ui')
-rw-r--r--ui/managewindow.go4
-rw-r--r--ui/ui.go3
2 files changed, 3 insertions, 4 deletions
diff --git a/ui/managewindow.go b/ui/managewindow.go
index 8bf6422c..6ba49e65 100644
--- a/ui/managewindow.go
+++ b/ui/managewindow.go
@@ -40,8 +40,8 @@ var initedManageTunnels sync.Once
func NewManageTunnelsWindow() (*ManageTunnelsWindow, error) {
initedManageTunnels.Do(func() {
walk.AppendToWalkInit(func() {
- walk.MustRegisterWindowClass(manageWindowWindowClass)
- taskbarButtonCreatedMsg = win.RegisterWindowMessage(windows.StringToUTF16Ptr("TaskbarButtonCreated"))
+ walk.MustRegisterWindowClass(manageWindowWindowClass)
+ taskbarButtonCreatedMsg = win.RegisterWindowMessage(windows.StringToUTF16Ptr("TaskbarButtonCreated"))
})
})
diff --git a/ui/ui.go b/ui/ui.go
index 42b351e8..179b0d38 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -25,8 +25,7 @@ var startTime = time.Now()
func RunUI() {
runtime.LockOSThread()
- thisProcess, _ := windows.GetCurrentProcess()
- windows.SetProcessPriorityBoost(thisProcess, false)
+ windows.SetProcessPriorityBoost(windows.GetCurrentProcess(), false)
defer func() {
if err := recover(); err != nil {
showErrorCustom(nil, "Panic", fmt.Sprint(err, "\n\n", string(debug.Stack())))