From 87cec808020f63ceae82551b377401f812abf650 Mon Sep 17 00:00:00 2001 From: ShuheiKubota Date: Sun, 10 Nov 2019 10:18:15 +0900 Subject: [PATCH] fix: alpha 100% does not work without -t --- vvin.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vvin.go b/vvin.go index 53832ed..64ecb07 100644 --- a/vvin.go +++ b/vvin.go @@ -185,10 +185,9 @@ func (c alphaCmd) Run(args []string, g globalCmd) error { style, _, _ := getWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE) setWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE, style|WS_EX_LAYERED) + setLayeredWindowAttributes.Call(uintptr(g.targetHandle), 0, uintptr(alpha), LWA_ALPHA) if alpha == 255 { setWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE, style&^WS_EX_LAYERED) - } else { - setLayeredWindowAttributes.Call(uintptr(g.targetHandle), 0, uintptr(alpha), LWA_ALPHA) } return nil