vvin/cmd_topmost.go
2023-10-17 00:00:50 -04:00

24 lines
348 B
Go

//go:build windows
// +build windows
package vvin
type topmostCmd struct {
Restore bool `cli:"restore,r"`
}
func (c topmostCmd) Run(g globalCmd) {
hwndInsertAfter := hwndTopmost
if c.Restore {
hwndInsertAfter = hwndNoTopmost
}
setWindowPos.Call(
uintptr(g.targetHandle),
hwndInsertAfter,
0,
0,
0,
0,
swpNoSize|swpNoMove)
}