Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40370fce29 |
@@ -437,6 +437,17 @@ func setTaskbarState(owner uintptr, state uintptr) {
|
|||||||
appBar(abmSetState, &abd)
|
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() {
|
func hideTaskbar() {
|
||||||
tb := findTaskbar()
|
tb := findTaskbar()
|
||||||
if tb == 0 {
|
if tb == 0 {
|
||||||
@@ -983,6 +994,7 @@ func wndProc(hwnd, m, wparam, lparam uintptr) (result uintptr) {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
hideTaskbar()
|
hideTaskbar()
|
||||||
|
keepOnTop(hwnd)
|
||||||
tick++
|
tick++
|
||||||
changed := refreshApps(tick%16 == 0)
|
changed := refreshApps(tick%16 == 0)
|
||||||
if gmTick(tick) {
|
if gmTick(tick) {
|
||||||
|
|||||||
Reference in New Issue
Block a user