Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40370fce29 |
@@ -437,6 +437,17 @@ func setTaskbarState(owner uintptr, state uintptr) {
|
||||
appBar(abmSetState, &abd)
|
||||
}
|
||||
|
||||
// keepOnTop puts the bar back in the topmost band if Windows or another program
|
||||
// has knocked it out of it, which otherwise sinks it under every other window.
|
||||
func keepOnTop(hwnd uintptr) {
|
||||
ex, _, _ := pGetWindowLongPtr.Call(hwnd, neg(-20))
|
||||
if ex&wsExTopmost != 0 {
|
||||
return
|
||||
}
|
||||
const swpNoSize, swpNoMove = 0x0001, 0x0002
|
||||
pSetWindowPos.Call(hwnd, hwndTopmost, 0, 0, 0, 0, swpNoSize|swpNoMove|swpNoActivate)
|
||||
}
|
||||
|
||||
func hideTaskbar() {
|
||||
tb := findTaskbar()
|
||||
if tb == 0 {
|
||||
@@ -983,6 +994,7 @@ func wndProc(hwnd, m, wparam, lparam uintptr) (result uintptr) {
|
||||
return 0
|
||||
}
|
||||
hideTaskbar()
|
||||
keepOnTop(hwnd)
|
||||
tick++
|
||||
changed := refreshApps(tick%16 == 0)
|
||||
if gmTick(tick) {
|
||||
|
||||
Reference in New Issue
Block a user