fixed bugs related to issue #14
This commit is contained in:
parent
b258c459c2
commit
0780f25c18
2 changed files with 18 additions and 18 deletions
|
@ -24,6 +24,7 @@ Manager_init()
|
|||
; New/closed windows, active changed,
|
||||
Manager_windowsDirty := 0
|
||||
Manager_aMonitor := 1
|
||||
View_tiledWndId0 := 0
|
||||
|
||||
doRestore := 0
|
||||
If (Config_autoSaveSession = "ask")
|
||||
|
@ -974,7 +975,7 @@ Manager_setViewMonitor(i, d = 0) {
|
|||
{
|
||||
Loop, % Config_viewCount {
|
||||
StringReplace, View_#%Manager_aMonitor%_#%A_Index%_wndIds, View_#%Manager_aMonitor%_#%A_Index%_wndIds, %A_LoopField%`;,
|
||||
View_setActiveWindow(Manager_aMonitor, A_Index, 0)
|
||||
StringReplace, View_#%Manager_aMonitor%_#%A_Index%_aWndIds, View_#%Manager_aMonitor%_#%A_Index%_aWndIds, %A_LoopField%`;,
|
||||
}
|
||||
Window_#%A_LoopField%_monitor := i
|
||||
Window_#%A_LoopField%_tags := 1 << v - 1
|
||||
|
@ -1026,8 +1027,7 @@ Manager_setWindowMonitor(i, d = 0) {
|
|||
If (Manager_monitorCount > 1 And InStr(Manager_managedWndIds, aWndId ";")) {
|
||||
Loop, % Config_viewCount {
|
||||
StringReplace, View_#%Manager_aMonitor%_#%A_Index%_wndIds, View_#%Manager_aMonitor%_#%A_Index%_wndIds, %aWndId%`;,
|
||||
If (View_getActiveWindow(Manager_aMonitor, A_Index) = aWndId)
|
||||
View_setActiveWindow(Manager_aMonitor, A_Index, 0)
|
||||
StringReplace, View_#%Manager_aMonitor%_#%A_Index%_aWndIds, View_#%Manager_aMonitor%_#%A_Index%_aWndIds, %aWndId%`;, All
|
||||
Bar_updateView(Manager_aMonitor, A_Index)
|
||||
}
|
||||
If Config_dynamicTiling
|
||||
|
@ -1188,13 +1188,12 @@ Manager_unmanage(wndId) {
|
|||
}
|
||||
|
||||
Manager_winActivate(wndId) {
|
||||
Global Manager_aMonitor
|
||||
|
||||
Manager_setCursor(wndId)
|
||||
Debug_logMessage("DEBUG[1] Activating window: " wndId, 1)
|
||||
If Not wndId {
|
||||
If (A_OSVersion = "WIN_8" Or A_OSVersion = "WIN_8.1")
|
||||
WinGet, wndId, ID, ahk_class WorkerW
|
||||
Else
|
||||
WinGet, wndId, ID, Program Manager ahk_class Progman
|
||||
wndId := WinExist("bug.n_BAR_" . Manager_aMonitor)
|
||||
Debug_logMessage("DEBUG[1] Activating Desktop: " wndId, 1)
|
||||
}
|
||||
|
||||
|
|
|
@ -34,27 +34,28 @@ Monitor_init(m, doRestore) {
|
|||
}
|
||||
|
||||
Monitor_activateView(i, d = 0) {
|
||||
Local aView, aWndId, detectHidden, m, n, wndId, wndIds
|
||||
Local aMonitor, aView, aWndId, detectHidden, m, n, wndId, wndIds
|
||||
|
||||
aMonitor := Manager_aMonitor
|
||||
If (i = -1)
|
||||
i := Monitor_#%Manager_aMonitor%_aView_#2
|
||||
i := Monitor_#%aMonitor%_aView_#2
|
||||
Else If (i = 0)
|
||||
i := Monitor_#%Manager_aMonitor%_aView_#1
|
||||
i := Monitor_#%aMonitor%_aView_#1
|
||||
i := Manager_loop(i, d, 1, Config_viewCount)
|
||||
|
||||
Debug_logMessage("DEBUG[1] Monitor_activateView; i: " . i . ", d: " . d . ", Manager_aMonitor: " . Manager_aMonitor . ", wndIds: " . View_#%Manager_aMonitor%_#%i%_wndIds, 1)
|
||||
Debug_logMessage("DEBUG[1] Monitor_activateView; i: " . i . ", d: " . d . ", Manager_aMonitor: " . aMonitor . ", wndIds: " . View_#%Manager_aMonitor%_#%i%_wndIds, 1)
|
||||
If (i <= 0) Or (i > Config_viewCount) Or Manager_hideShow
|
||||
Return
|
||||
;; Re-arrange the windows on the active view.
|
||||
If (i = Monitor_#%Manager_aMonitor%_aView_#1) {
|
||||
View_arrange(Manager_aMonitor, i)
|
||||
If (i = Monitor_#%aMonitor%_aView_#1) {
|
||||
View_arrange(aMonitor, i)
|
||||
Return
|
||||
}
|
||||
|
||||
aView := Monitor_#%Manager_aMonitor%_aView_#1
|
||||
aView := Monitor_#%aMonitor%_aView_#1
|
||||
WinGet, aWndId, ID, A
|
||||
If WinExist("ahk_id" aWndId) And InStr(View_#%Manager_aMonitor%_#%aView%_wndIds, aWndId ";") And Window_isProg(aWndId)
|
||||
View_setActiveWindow(Manager_aMonitor, aView, aWndId)
|
||||
If WinExist("ahk_id" aWndId) And InStr(View_#%aMonitor%_#%aView%_wndIds, aWndId ";") And Window_isProg(aWndId)
|
||||
View_setActiveWindow(aMonitor, aView, aWndId)
|
||||
|
||||
n := Config_syncMonitorViews
|
||||
If (n = 1)
|
||||
|
@ -63,7 +64,7 @@ Monitor_activateView(i, d = 0) {
|
|||
n := 1
|
||||
Loop, % n {
|
||||
If (n = 1)
|
||||
m := Manager_aMonitor
|
||||
m := aMonitor
|
||||
Else
|
||||
m := A_Index
|
||||
|
||||
|
@ -99,7 +100,7 @@ Monitor_activateView(i, d = 0) {
|
|||
Bar_updateView(m, i)
|
||||
}
|
||||
|
||||
wndId := View_getActiveWindow(Manager_aMonitor, i)
|
||||
wndId := View_getActiveWindow(aMonitor, i)
|
||||
Manager_winActivate(wndId)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue