vvin/cmd_topmost.go
2019-11-18 18:42:38 +09:00

21 lines
310 B
Go

package main
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)
}