vvin/cmd_topmost.go

22 lines
314 B
Go
Raw Normal View History

2019-11-09 22:56:05 -05:00
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)
}