2019-11-09 22:56:05 -05:00
|
|
|
package main
|
|
|
|
|
|
|
|
type topmostCmd struct {
|
|
|
|
Restore bool `cli:"restore,r"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c topmostCmd) Run(g globalCmd) {
|
2019-11-18 04:42:38 -05:00
|
|
|
hwndInsertAfter := hwndTopmost
|
2019-11-09 22:56:05 -05:00
|
|
|
if c.Restore {
|
2019-11-18 04:42:38 -05:00
|
|
|
hwndInsertAfter = hwndNoTopmost
|
2019-11-09 22:56:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
setWindowPos.Call(
|
|
|
|
uintptr(g.targetHandle),
|
|
|
|
hwndInsertAfter,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2019-11-18 04:42:38 -05:00
|
|
|
swpNoSize|swpNoMove)
|
2019-11-09 22:56:05 -05:00
|
|
|
}
|