vvin/cmd_topmost.go
2019-11-10 12:56:05 +09:00

21 lines
314 B
Go

package main
type topmostCmd struct {
Restore bool `cli:"restore,r"`
}
func (c topmostCmd) Run(g globalCmd) {
hwndInsertAfter := HWND_TOPMOST
if c.Restore {
hwndInsertAfter = HWND_NOTOPMOST
}
setWindowPos.Call(
uintptr(g.targetHandle),
hwndInsertAfter,
0,
0,
0,
0,
SWP_NOSIZE|SWP_NOMOVE)
}