Update the layout of the current view if it is re-activated.
This commit is contained in:
parent
5276471f49
commit
8e5e42a653
1 changed files with 57 additions and 49 deletions
|
@ -40,7 +40,17 @@ Monitor_activateView(v) {
|
|||
v := Manager_loop(Monitor_#%Manager_aMonitor%_aView_#1, +1, 1, Config_viewCount)
|
||||
Else If (v = "<")
|
||||
v := Manager_loop(Monitor_#%Manager_aMonitor%_aView_#1, -1, 1, Config_viewCount)
|
||||
If (v > 0) And (v <= Config_viewCount) And Not Manager_hideShow And Not (v = Monitor_#%Manager_aMonitor%_aView_#1) {
|
||||
|
||||
;Log_msg("Monitor_activateView(" . v . ") wndIds: " . View_#%m%_#%aView%_wndIds)
|
||||
|
||||
If (v <= 0) Or (v > Config_viewCount) Or Manager_hideShow
|
||||
Return
|
||||
; Re-arrange the windows on the view.
|
||||
If (v = Monitor_#%Manager_aMonitor%_aView_#1) {
|
||||
View_arrange(Manager_aMonitor, v)
|
||||
Return
|
||||
}
|
||||
|
||||
aView := Monitor_#%Manager_aMonitor%_aView_#1
|
||||
WinGet, aWndId, ID, A
|
||||
If WinExist("ahk_id" aWndId) And InStr(View_#%Manager_aMonitor%_#%aView%_wndIds, aWndId ";") {
|
||||
|
@ -50,11 +60,9 @@ Monitor_activateView(v) {
|
|||
View_#%Manager_aMonitor%_#%aView%_aWndId := aWndId
|
||||
}
|
||||
|
||||
n := Config_syncMonitorViews
|
||||
If (n = 1)
|
||||
n := Manager_monitorCount
|
||||
Else If (n < 1)
|
||||
n := 1
|
||||
If (Config_syncMonitorViews > 0)
|
||||
n := Manager_monitorCount
|
||||
Loop, % n {
|
||||
If (n = 1)
|
||||
m := Manager_aMonitor
|
||||
|
@ -70,14 +78,15 @@ Monitor_activateView(v) {
|
|||
If Not (Manager_#%A_LoopField%_tags & (1 << v - 1))
|
||||
WinHide, ahk_id %A_LoopField%
|
||||
StringTrimRight, wndIds, View_#%m%_#%v%_wndIds, 1
|
||||
DetectHiddenWindows, On
|
||||
View_arrange(m, v)
|
||||
DetectHiddenWindows, Off
|
||||
Loop, PARSE, wndIds, `;
|
||||
WinShow, ahk_id %A_LoopField%
|
||||
Manager_hideShow := False
|
||||
|
||||
Bar_updateView(m, aView)
|
||||
Bar_updateView(m, v)
|
||||
|
||||
View_arrange(m, v)
|
||||
}
|
||||
|
||||
wndId := View_#%Manager_aMonitor%_#%v%_aWndId
|
||||
|
@ -90,7 +99,6 @@ Monitor_activateView(v) {
|
|||
}
|
||||
Manager_winActivate(wndId)
|
||||
}
|
||||
}
|
||||
|
||||
Monitor_get(x, y) {
|
||||
Local m
|
||||
|
|
Loading…
Reference in a new issue