Fixed bug in "active window" tracking
+ fixed conflicting bug in in "Manager_closeWindow" + fixed visual bug in "Window_isElevated"
This commit is contained in:
parent
0c07b0c65d
commit
b79369c125
3 changed files with 3 additions and 11 deletions
BIN
bugn.exe
BIN
bugn.exe
Binary file not shown.
|
@ -175,18 +175,8 @@ Manager_closeWindow() {
|
||||||
Local aView, aWndId, wndId0, wndIds
|
Local aView, aWndId, wndId0, wndIds
|
||||||
|
|
||||||
WinGet, aWndId, ID, A
|
WinGet, aWndId, ID, A
|
||||||
If Window_isProg(aWndId) {
|
If Window_isProg(aWndId)
|
||||||
;; Prior to closing, find the next window that should have focus.
|
|
||||||
;; If there is no such window, choose the bar on the same monitor.
|
|
||||||
aView := Monitor_#%Manager_aMonitor%_aView_#1
|
|
||||||
StringTrimRight, wndIds, View_#%Manager_aMonitor%_#%aView%_wndIds, 1
|
|
||||||
StringSplit, wndId, wndIds, `;
|
|
||||||
If (wndId0 >= 2)
|
|
||||||
View_activateWindow(0, +1)
|
|
||||||
Else
|
|
||||||
Manager_winActivate(0)
|
|
||||||
Window_close(aWndId)
|
Window_close(aWndId)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
; Asynchronous management of various WM properties.
|
; Asynchronous management of various WM properties.
|
||||||
|
@ -552,6 +542,7 @@ Manager_onShellMessage(wParam, lParam) {
|
||||||
Debug_logMessage("DEBUG[1] Manager_onShellMessage: Manager_monitorCount: " Manager_monitorCount ", Manager_aMonitor: " Manager_aMonitor ", m: " m, 1)
|
Debug_logMessage("DEBUG[1] Manager_onShellMessage: Manager_monitorCount: " Manager_monitorCount ", Manager_aMonitor: " Manager_aMonitor ", m: " m, 1)
|
||||||
If m
|
If m
|
||||||
Manager_aMonitor := m
|
Manager_aMonitor := m
|
||||||
|
View_setActiveWindow(Manager_aMonitor, Monitor_#%Manager_aMonitor%_aView_#1, lParam)
|
||||||
updateTitleBar := True
|
updateTitleBar := True
|
||||||
} Else If (wParam = HSHELL_WINDOWREPLACED) {
|
} Else If (wParam = HSHELL_WINDOWREPLACED) {
|
||||||
updateView := Manager_unmanage(lParam)
|
updateView := Manager_unmanage(lParam)
|
||||||
|
|
|
@ -78,6 +78,7 @@ Window_isElevated(wndId) {
|
||||||
WinGetTitle, wndTitle, ahk_id %wndId%
|
WinGetTitle, wndTitle, ahk_id %wndId%
|
||||||
WinSetTitle, ahk_id %wndId%, , % wndTitle " "
|
WinSetTitle, ahk_id %wndId%, , % wndTitle " "
|
||||||
WinGetTitle, newWndTitle, ahk_id %wndId%
|
WinGetTitle, newWndTitle, ahk_id %wndId%
|
||||||
|
WinSetTitle, ahk_id %wndId%, , % wndTitle
|
||||||
Return, (newWndTitle = wndTitle)
|
Return, (newWndTitle = wndTitle)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue