Fixed bug in "active window" tracking

+ fixed conflicting bug in in "Manager_closeWindow"
+ fixed visual bug in "Window_isElevated"
This commit is contained in:
joten 2015-02-16 22:38:42 +01:00
parent 0c07b0c65d
commit b79369c125
3 changed files with 3 additions and 11 deletions

BIN
bugn.exe

Binary file not shown.

View file

@ -175,18 +175,8 @@ Manager_closeWindow() {
Local aView, aWndId, wndId0, wndIds
WinGet, aWndId, ID, A
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)
If Window_isProg(aWndId)
Window_close(aWndId)
}
}
; 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)
If m
Manager_aMonitor := m
View_setActiveWindow(Manager_aMonitor, Monitor_#%Manager_aMonitor%_aView_#1, lParam)
updateTitleBar := True
} Else If (wParam = HSHELL_WINDOWREPLACED) {
updateView := Manager_unmanage(lParam)

View file

@ -78,6 +78,7 @@ Window_isElevated(wndId) {
WinGetTitle, wndTitle, ahk_id %wndId%
WinSetTitle, ahk_id %wndId%, , % wndTitle " "
WinGetTitle, newWndTitle, ahk_id %wndId%
WinSetTitle, ahk_id %wndId%, , % wndTitle
Return, (newWndTitle = wndTitle)
}