fix: keep Cua foreground actions on the target window

This commit is contained in:
chenmingxuan committed 2026-10-18 21:02:49 +08:00
1 parent 889a951c9b
commit 6de0b1b276
13 files changed
+327 -31

No files matched your search

+5
View File
@@ -11,6 +11,11 @@ import (
var user32 = syscall.NewLazyDLL("user32.dll")
var kernel32 = syscall.NewLazyDLL("kernel32.dll")
func foregroundWindow() int64 {
hwnd, _, _ := user32.NewProc("GetForegroundWindow").Call()
return int64(hwnd)
}
func configureProcess(c *exec.Cmd) {
c.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
}