Renamed window-related global variables
This commit is contained in:
parent
71e4025a09
commit
d26791d2cf
6 changed files with 55 additions and 55 deletions
|
@ -482,7 +482,7 @@ Bar_updateTitle()
|
||||||
WinGetTitle, aWndTitle, ahk_id %aWndId%
|
WinGetTitle, aWndTitle, ahk_id %aWndId%
|
||||||
If InStr(Bar_hideTitleWndIds, aWndId ";") Or (aWndTitle = "bug.n_BAR_0")
|
If InStr(Bar_hideTitleWndIds, aWndId ";") Or (aWndTitle = "bug.n_BAR_0")
|
||||||
aWndTitle := ""
|
aWndTitle := ""
|
||||||
If Manager_#%aWndId%_isFloating
|
If Window_#%aWndId%_isFloating
|
||||||
aWndTitle := "~ " aWndTitle
|
aWndTitle := "~ " aWndTitle
|
||||||
If (Manager_monitorCount > 1)
|
If (Manager_monitorCount > 1)
|
||||||
aWndTitle := "[" Manager_aMonitor "] " aWndTitle
|
aWndTitle := "[" Manager_aMonitor "] " aWndTitle
|
||||||
|
|
|
@ -94,11 +94,11 @@ Debug_logViewWindowList()
|
||||||
|
|
||||||
Debug_logWindowInfo(wndId)
|
Debug_logWindowInfo(wndId)
|
||||||
{
|
{
|
||||||
Local aWndId, detect_state, text, v
|
Local aWndId, detectSetting, text, v
|
||||||
Local isBugnActive, isDecorated, isFloating, isGhost, isHidden, isResponsive, isWinFocus
|
Local isBugnActive, isDecorated, isFloating, isGhost, isHidden, isResponsive, isWinFocus
|
||||||
Local wndClass, wndH, wndProc, wndStyle, wndTitle, wndW, wndX, wndY
|
Local wndClass, wndH, wndProc, wndStyle, wndTitle, wndW, wndX, wndY
|
||||||
|
|
||||||
detect_state := A_DetectHiddenWindows
|
detectSetting := A_DetectHiddenWindows
|
||||||
DetectHiddenWindows, On
|
DetectHiddenWindows, On
|
||||||
WinGet, aWndId, ID, A
|
WinGet, aWndId, ID, A
|
||||||
If aWndId = %wndId%
|
If aWndId = %wndId%
|
||||||
|
@ -117,11 +117,11 @@ Debug_logWindowInfo(wndId)
|
||||||
isHidden := "*"
|
isHidden := "*"
|
||||||
Else
|
Else
|
||||||
isHidden := " "
|
isHidden := " "
|
||||||
If Manager_#%wndId%_isFloating
|
If Window_#%wndId%_isFloating
|
||||||
isFloating := "*"
|
isFloating := "*"
|
||||||
Else
|
Else
|
||||||
isFloating := " "
|
isFloating := " "
|
||||||
If Manager_#%wndId%_isDecorated
|
If Window_#%wndId%_isDecorated
|
||||||
isDecorated := "*"
|
isDecorated := "*"
|
||||||
Else
|
Else
|
||||||
isDecorated := " "
|
isDecorated := " "
|
||||||
|
@ -131,7 +131,7 @@ Debug_logWindowInfo(wndId)
|
||||||
isGhost := "*"
|
isGhost := "*"
|
||||||
Else
|
Else
|
||||||
isGhost := " "
|
isGhost := " "
|
||||||
DetectHiddenWindows, %detect_state%
|
DetectHiddenWindows, %detectSetting%
|
||||||
|
|
||||||
;; Intentionally don't detect hidden windows here to see what Manager_hungTest does
|
;; Intentionally don't detect hidden windows here to see what Manager_hungTest does
|
||||||
If Window_isHung(wndId)
|
If Window_isHung(wndId)
|
||||||
|
@ -141,7 +141,7 @@ Debug_logWindowInfo(wndId)
|
||||||
|
|
||||||
text := wndId "`t"
|
text := wndId "`t"
|
||||||
text .= isHidden " " isWinFocus " " isBugnActive " " isFloating " " isDecorated " " isResponsive " " isGhost " "
|
text .= isHidden " " isWinFocus " " isBugnActive " " isFloating " " isDecorated " " isResponsive " " isGhost " "
|
||||||
text .= Manager_#%wndId%_monitor "`t" Manager_#%wndId%_tags "`t"
|
text .= Window_#%wndId%_monitor "`t" Window_#%wndId%_tags "`t"
|
||||||
text .= wndX "`t" wndY "`t" wndW "`t" wndH "`t" wndStyle "`t" wndProc " / " wndClass " / " wndTitle
|
text .= wndX "`t" wndY "`t" wndW "`t" wndH "`t" wndStyle "`t" wndProc " / " wndClass " / " wndTitle
|
||||||
Debug_logMessage(text , 0, False)
|
Debug_logMessage(text , 0, False)
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,7 @@ Manager_getWindowInfo()
|
||||||
rule .= ";1"
|
rule .= ";1"
|
||||||
Else
|
Else
|
||||||
rule .= ";0"
|
rule .= ";0"
|
||||||
rule .= ";" Manager_#%aWndId%_monitor ";" Manager_#%aWndId%_tags ";" Manager_#%aWndId%_isFloating ";" Manager_#%aWndId%_isDecorated
|
rule .= ";" Window_#%aWndId%_monitor ";" Window_#%aWndId%_tags ";" Window_#%aWndId%_isFloating ";" Window_#%aWndId%_isDecorated
|
||||||
If InStr(Bar_hiddenWndIds, aWndId) {
|
If InStr(Bar_hiddenWndIds, aWndId) {
|
||||||
text .= " (hidden)"
|
text .= " (hidden)"
|
||||||
rule .= ";1;"
|
rule .= ";1;"
|
||||||
|
@ -272,8 +272,8 @@ Manager_getWindowInfo()
|
||||||
rule .= ";0;"
|
rule .= ";0;"
|
||||||
If (aWndMinMax = 1)
|
If (aWndMinMax = 1)
|
||||||
rule .= "maximize"
|
rule .= "maximize"
|
||||||
text .= "`nprocess:`t" aWndProcessName "`nstyle:`t" aWndStyle "`nmetrics:`tx: " aWndX ", y: " aWndY ", width: " aWndWidth ", height: " aWndHeight "`ntags:`t" Manager_#%aWndId%_tags
|
text .= "`nprocess:`t" aWndProcessName "`nstyle:`t" aWndStyle "`nmetrics:`tx: " aWndX ", y: " aWndY ", width: " aWndWidth ", height: " aWndHeight "`ntags:`t" Window_#%aWndId%_tags
|
||||||
If Manager_#%aWndId%_isFloating
|
If Window_#%aWndId%_isFloating
|
||||||
text .= " (floating)"
|
text .= " (floating)"
|
||||||
text .= "`n`n" rule
|
text .= "`n`n" rule
|
||||||
MsgBox, 260, bug.n: Window Information, % text "`n`nCopy text to clipboard?"
|
MsgBox, 260, bug.n: Window Information, % text "`n`nCopy text to clipboard?"
|
||||||
|
@ -342,17 +342,17 @@ Manager__setWinProperties(wndId, isManaged, m, tags, isDecorated, isFloating, hi
|
||||||
|
|
||||||
Manager_managedWndIds .= wndId ";"
|
Manager_managedWndIds .= wndId ";"
|
||||||
Monitor_moveWindow(m, wndId)
|
Monitor_moveWindow(m, wndId)
|
||||||
Manager_#%wndId%_tags := tags
|
Window_#%wndId%_tags := tags
|
||||||
Manager_#%wndId%_isDecorated := isDecorated
|
Window_#%wndId%_isDecorated := isDecorated
|
||||||
Manager_#%wndId%_isFloating := isFloating
|
Window_#%wndId%_isFloating := isFloating
|
||||||
Manager_#%wndId%_area := 0
|
Window_#%wndId%_area := 0
|
||||||
|
|
||||||
If Not Config_showBorder
|
If Not Config_showBorder
|
||||||
Window_set(wndId, "Style", "-0x40000")
|
Window_set(wndId, "Style", "-0x40000")
|
||||||
If Not Manager_#%wndId%_isDecorated
|
If Not Window_#%wndId%_isDecorated
|
||||||
Window_set(wndId, "Style", "-0xC00000")
|
Window_set(wndId, "Style", "-0xC00000")
|
||||||
|
|
||||||
a := Manager_#%wndId%_tags & (1 << (Monitor_#%m%_aView_#1 - 1))
|
a := Window_#%wndId%_tags & (1 << (Monitor_#%m%_aView_#1 - 1))
|
||||||
If a
|
If a
|
||||||
{
|
{
|
||||||
;; A newly created window defines the active monitor, if it is visible.
|
;; A newly created window defines the active monitor, if it is visible.
|
||||||
|
@ -391,10 +391,10 @@ Manager_manage(preferredMonitor, preferredView, wndId)
|
||||||
If body
|
If body
|
||||||
{
|
{
|
||||||
isManaged := InStr(Manager_managedWndIds, body ";")
|
isManaged := InStr(Manager_managedWndIds, body ";")
|
||||||
m := Manager_#%body%_monitor
|
m := Window_#%body%_monitor
|
||||||
tags := Manager_#%body%_tags
|
tags := Window_#%body%_tags
|
||||||
isDecorated := Manager_#%body%_isDecorated
|
isDecorated := Window_#%body%_isDecorated
|
||||||
isFloating := Manager_#%body%_isFloating
|
isFloating := Window_#%body%_isFloating
|
||||||
hideTitle := InStr(Bar_hideTitleWndIds, body ";")
|
hideTitle := InStr(Bar_hideTitleWndIds, body ";")
|
||||||
action := ""
|
action := ""
|
||||||
}
|
}
|
||||||
|
@ -423,7 +423,7 @@ Manager_manage(preferredMonitor, preferredView, wndId)
|
||||||
; Do view placement.
|
; Do view placement.
|
||||||
If isManaged {
|
If isManaged {
|
||||||
Loop, % Config_viewCount
|
Loop, % Config_viewCount
|
||||||
If (Manager_#%wndId%_tags & (1 << (A_Index - 1))) {
|
If (Window_#%wndId%_tags & (1 << (A_Index - 1))) {
|
||||||
If (body) {
|
If (body) {
|
||||||
; Try to position near the body.
|
; Try to position near the body.
|
||||||
View_ghostWindow(m, A_Index, body, wndId)
|
View_ghostWindow(m, A_Index, body, wndId)
|
||||||
|
@ -443,7 +443,7 @@ Manager_maximizeWindow()
|
||||||
WinGet, aWndId, ID, A
|
WinGet, aWndId, ID, A
|
||||||
v := Monitor_#%Manager_aMonitor%_aView_#1
|
v := Monitor_#%Manager_aMonitor%_aView_#1
|
||||||
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
||||||
If Not Manager_#%aWndId%_isFloating And Not (Config_layoutFunction_#%l% = "")
|
If Not Window_#%aWndId%_isFloating And Not (Config_layoutFunction_#%l% = "")
|
||||||
View_toggleFloating()
|
View_toggleFloating()
|
||||||
Window_set(aWndId, "Top", "")
|
Window_set(aWndId, "Top", "")
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ Manager_moveWindow()
|
||||||
WinGet, aWndId, ID, A
|
WinGet, aWndId, ID, A
|
||||||
v := Monitor_#%Manager_aMonitor%_aView_#1
|
v := Monitor_#%Manager_aMonitor%_aView_#1
|
||||||
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
||||||
If Not Manager_#%aWndId%_isFloating And Not (Config_layoutFunction_#%l% = "")
|
If Not Window_#%aWndId%_isFloating And Not (Config_layoutFunction_#%l% = "")
|
||||||
View_toggleFloating()
|
View_toggleFloating()
|
||||||
Window_set(aWndId, "Top", "")
|
Window_set(aWndId, "Top", "")
|
||||||
|
|
||||||
|
@ -588,11 +588,11 @@ Manager_onShellMessage(wParam, lParam) {
|
||||||
wndId := SubStr(wndIds, 1, InStr(wndIds, ";") - 1)
|
wndId := SubStr(wndIds, 1, InStr(wndIds, ";") - 1)
|
||||||
Loop, % Config_viewCount
|
Loop, % Config_viewCount
|
||||||
{
|
{
|
||||||
If (Manager_#%wndId%_tags & 1 << A_Index - 1)
|
If (Window_#%wndId%_tags & 1 << A_Index - 1)
|
||||||
{
|
{
|
||||||
Debug_logMessage("DEBUG[3] Switching views because " . wndId . " is considered hidden and active", 3)
|
Debug_logMessage("DEBUG[3] Switching views because " . wndId . " is considered hidden and active", 3)
|
||||||
;; A newly created window defines the active monitor, if it is visible.
|
;; A newly created window defines the active monitor, if it is visible.
|
||||||
Manager_aMonitor := Manager_#%wndId%_monitor
|
Manager_aMonitor := Window_#%wndId%_monitor
|
||||||
Monitor_activateView(A_Index)
|
Monitor_activateView(A_Index)
|
||||||
Break
|
Break
|
||||||
}
|
}
|
||||||
|
@ -618,7 +618,7 @@ Manager_onShellMessage(wParam, lParam) {
|
||||||
wndId := wndId%A_Index%
|
wndId := wndId%A_Index%
|
||||||
View_#%Manager_aMonitor%_#%t%_wndIds := wndId ";" View_#%Manager_aMonitor%_#%t%_wndIds
|
View_#%Manager_aMonitor%_#%t%_wndIds := wndId ";" View_#%Manager_aMonitor%_#%t%_wndIds
|
||||||
View_#%Manager_aMonitor%_#%t%_aWndId := wndId
|
View_#%Manager_aMonitor%_#%t%_aWndId := wndId
|
||||||
Manager_#%wndId%_tags += 1 << t - 1
|
Window_#%wndId%_tags += 1 << t - 1
|
||||||
}
|
}
|
||||||
Bar_updateView(Manager_aMonitor, t)
|
Bar_updateView(Manager_aMonitor, t)
|
||||||
If Config_dynamicTiling
|
If Config_dynamicTiling
|
||||||
|
@ -749,7 +749,7 @@ Manager_setViewMonitor(d)
|
||||||
}
|
}
|
||||||
|
|
||||||
Monitor_moveWindow(m, A_LoopField)
|
Monitor_moveWindow(m, A_LoopField)
|
||||||
Manager_#%A_LoopField%_tags := 1 << v - 1
|
Window_#%A_LoopField%_tags := 1 << v - 1
|
||||||
}
|
}
|
||||||
View_arrange(Manager_aMonitor, aView)
|
View_arrange(Manager_aMonitor, aView)
|
||||||
Loop, % Config_viewCount
|
Loop, % Config_viewCount
|
||||||
|
@ -814,7 +814,7 @@ Manager_setWindowMonitor(d)
|
||||||
Manager_aMonitor := Manager_loop(Manager_aMonitor, d, 1, Manager_monitorCount)
|
Manager_aMonitor := Manager_loop(Manager_aMonitor, d, 1, Manager_monitorCount)
|
||||||
Monitor_moveWindow(Manager_aMonitor, aWndId)
|
Monitor_moveWindow(Manager_aMonitor, aWndId)
|
||||||
v := Monitor_#%Manager_aMonitor%_aView_#1
|
v := Monitor_#%Manager_aMonitor%_aView_#1
|
||||||
Manager_#%aWndId%_tags := 1 << v - 1
|
Window_#%aWndId%_tags := 1 << v - 1
|
||||||
View_#%Manager_aMonitor%_#%v%_wndIds := aWndId ";" View_#%Manager_aMonitor%_#%v%_wndIds
|
View_#%Manager_aMonitor%_#%v%_wndIds := aWndId ";" View_#%Manager_aMonitor%_#%v%_wndIds
|
||||||
View_#%Manager_aMonitor%_#%v%_aWndId := aWndId
|
View_#%Manager_aMonitor%_#%v%_aWndId := aWndId
|
||||||
If Config_dynamicTiling
|
If Config_dynamicTiling
|
||||||
|
@ -831,7 +831,7 @@ Manager_sizeWindow()
|
||||||
WinGet, aWndId, ID, A
|
WinGet, aWndId, ID, A
|
||||||
v := Monitor_#%Manager_aMonitor%_aView_#1
|
v := Monitor_#%Manager_aMonitor%_aView_#1
|
||||||
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
||||||
If Not Manager_#%aWndId%_isFloating And Not (Config_layoutFunction_#%l% = "")
|
If Not Window_#%aWndId%_isFloating And Not (Config_layoutFunction_#%l% = "")
|
||||||
View_toggleFloating()
|
View_toggleFloating()
|
||||||
Window_set(aWndId, "Top", "")
|
Window_set(aWndId, "Top", "")
|
||||||
|
|
||||||
|
@ -932,7 +932,7 @@ Manager_saveWindowState(filename, nm, nv)
|
||||||
Else
|
Else
|
||||||
isTitleHidden := 0
|
isTitleHidden := 0
|
||||||
|
|
||||||
text .= "Window " . wndId . ";" . process . ";" . Manager_#%wndId%_monitor . ";" . Manager_#%wndId%_tags . ";" . Manager_#%wndId%_isFloating . ";" . Manager_#%wndId%_isDecorated . ";" . isTitleHidden . ";" . isManaged . ";" . title . "`n"
|
text .= "Window " . wndId . ";" . process . ";" . Window_#%wndId%_monitor . ";" . Window_#%wndId%_tags . ";" . Window_#%wndId%_isFloating . ";" . Window_#%wndId%_isDecorated . ";" . isTitleHidden . ";" . isManaged . ";" . title . "`n"
|
||||||
}
|
}
|
||||||
DetectHiddenWindows, Off
|
DetectHiddenWindows, Off
|
||||||
|
|
||||||
|
@ -1167,20 +1167,20 @@ Manager_unmanage(wndId) {
|
||||||
|
|
||||||
;; Do our best to make sure that any unmanaged windows are left visible.
|
;; Do our best to make sure that any unmanaged windows are left visible.
|
||||||
Window_show(wndId)
|
Window_show(wndId)
|
||||||
a := Manager_#%wndId%_tags & 1 << Monitor_#%Manager_aMonitor%_aView_#1 - 1
|
a := Window_#%wndId%_tags & 1 << Monitor_#%Manager_aMonitor%_aView_#1 - 1
|
||||||
Loop, % Config_viewCount
|
Loop, % Config_viewCount
|
||||||
{
|
{
|
||||||
If (Manager_#%wndId%_tags & 1 << A_Index - 1)
|
If (Window_#%wndId%_tags & 1 << A_Index - 1)
|
||||||
{
|
{
|
||||||
StringReplace, View_#%Manager_aMonitor%_#%A_Index%_wndIds, View_#%Manager_aMonitor%_#%A_Index%_wndIds, %wndId%`;,
|
StringReplace, View_#%Manager_aMonitor%_#%A_Index%_wndIds, View_#%Manager_aMonitor%_#%A_Index%_wndIds, %wndId%`;,
|
||||||
Bar_updateView(Manager_aMonitor, A_Index)
|
Bar_updateView(Manager_aMonitor, A_Index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Manager_#%wndId%_monitor :=
|
Window_#%wndId%_monitor :=
|
||||||
Manager_#%wndId%_tags :=
|
Window_#%wndId%_tags :=
|
||||||
Manager_#%wndId%_isDecorated :=
|
Window_#%wndId%_isDecorated :=
|
||||||
Manager_#%wndId%_isFloating :=
|
Window_#%wndId%_isFloating :=
|
||||||
Manager_#%wndId%_area :=
|
Window_#%wndId%_area :=
|
||||||
StringReplace, Bar_hideTitleWndIds, Bar_hideTitleWndIds, %wndId%`;,
|
StringReplace, Bar_hideTitleWndIds, Bar_hideTitleWndIds, %wndId%`;,
|
||||||
StringReplace, Manager_allWndIds, Manager_allWndIds, %wndId%`;,
|
StringReplace, Manager_allWndIds, Manager_allWndIds, %wndId%`;,
|
||||||
StringReplace, Manager_managedWndIds, Manager_managedWndIds, %wndId%`;, , All
|
StringReplace, Manager_managedWndIds, Manager_managedWndIds, %wndId%`;, , All
|
||||||
|
|
|
@ -77,7 +77,7 @@ Monitor_activateView(v)
|
||||||
StringTrimRight, wndIds, View_#%m%_#%aView%_wndIds, 1
|
StringTrimRight, wndIds, View_#%m%_#%aView%_wndIds, 1
|
||||||
Loop, PARSE, wndIds, `;
|
Loop, PARSE, wndIds, `;
|
||||||
{
|
{
|
||||||
If Not (Manager_#%A_LoopField%_tags & (1 << v - 1))
|
If Not (Window_#%A_LoopField%_tags & (1 << v - 1))
|
||||||
Window_hide(A_LoopField)
|
Window_hide(A_LoopField)
|
||||||
}
|
}
|
||||||
SetWinDelay, 10
|
SetWinDelay, 10
|
||||||
|
@ -88,7 +88,7 @@ Monitor_activateView(v)
|
||||||
SetWinDelay, 0
|
SetWinDelay, 0
|
||||||
Loop, PARSE, wndIds, `;
|
Loop, PARSE, wndIds, `;
|
||||||
{
|
{
|
||||||
Manager_winShow(A_LoopField)
|
Window_show(A_LoopField)
|
||||||
}
|
}
|
||||||
SetWinDelay, 10
|
SetWinDelay, 10
|
||||||
Manager_hideShow := False
|
Manager_hideShow := False
|
||||||
|
@ -211,7 +211,7 @@ Monitor_moveWindow(m, wndId)
|
||||||
{
|
{
|
||||||
Global
|
Global
|
||||||
|
|
||||||
Manager_#%wndId%_monitor := m
|
Window_#%wndId%_monitor := m
|
||||||
}
|
}
|
||||||
|
|
||||||
Monitor_setWindowTag(t)
|
Monitor_setWindowTag(t)
|
||||||
|
@ -230,12 +230,12 @@ Monitor_setWindowTag(t)
|
||||||
{
|
{
|
||||||
Loop, % Config_viewCount
|
Loop, % Config_viewCount
|
||||||
{
|
{
|
||||||
If Not (Manager_#%aWndId%_tags & (1 << A_Index - 1))
|
If Not (Window_#%aWndId%_tags & (1 << A_Index - 1))
|
||||||
{
|
{
|
||||||
View_#%Manager_aMonitor%_#%A_Index%_wndIds := aWndId ";" View_#%Manager_aMonitor%_#%A_Index%_wndIds
|
View_#%Manager_aMonitor%_#%A_Index%_wndIds := aWndId ";" View_#%Manager_aMonitor%_#%A_Index%_wndIds
|
||||||
View_#%Manager_aMonitor%_#%A_Index%_aWndId := aWndId
|
View_#%Manager_aMonitor%_#%A_Index%_aWndId := aWndId
|
||||||
Bar_updateView(Manager_aMonitor, A_Index)
|
Bar_updateView(Manager_aMonitor, A_Index)
|
||||||
Manager_#%aWndId%_tags += 1 << A_Index - 1
|
Window_#%aWndId%_tags += 1 << A_Index - 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,10 +251,10 @@ Monitor_setWindowTag(t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
If Not (Manager_#%aWndId%_tags & (1 << t - 1))
|
If Not (Window_#%aWndId%_tags & (1 << t - 1))
|
||||||
View_#%Manager_aMonitor%_#%t%_wndIds := aWndId ";" View_#%Manager_aMonitor%_#%t%_wndIds
|
View_#%Manager_aMonitor%_#%t%_wndIds := aWndId ";" View_#%Manager_aMonitor%_#%t%_wndIds
|
||||||
View_#%Manager_aMonitor%_#%t%_aWndId := aWndId
|
View_#%Manager_aMonitor%_#%t%_aWndId := aWndId
|
||||||
Manager_#%aWndId%_tags := 1 << t - 1
|
Window_#%aWndId%_tags := 1 << t - 1
|
||||||
|
|
||||||
aView := Monitor_#%Manager_aMonitor%_aView_#1
|
aView := Monitor_#%Manager_aMonitor%_aView_#1
|
||||||
If Not (t = aView)
|
If Not (t = aView)
|
||||||
|
@ -342,11 +342,11 @@ Monitor_toggleWindowTag(t)
|
||||||
WinGet, aWndId, ID, A
|
WinGet, aWndId, ID, A
|
||||||
If (InStr(Manager_managedWndIds, aWndId ";") And t >= 0 And t <= Config_viewCount)
|
If (InStr(Manager_managedWndIds, aWndId ";") And t >= 0 And t <= Config_viewCount)
|
||||||
{
|
{
|
||||||
If (Manager_#%aWndId%_tags & (1 << t - 1))
|
If (Window_#%aWndId%_tags & (1 << t - 1))
|
||||||
{
|
{
|
||||||
If Not ((Manager_#%aWndId%_tags - (1 << t - 1)) = 0)
|
If Not ((Window_#%aWndId%_tags - (1 << t - 1)) = 0)
|
||||||
{
|
{
|
||||||
Manager_#%aWndId%_tags -= 1 << t - 1
|
Window_#%aWndId%_tags -= 1 << t - 1
|
||||||
StringReplace, View_#%Manager_aMonitor%_#%t%_wndIds, View_#%Manager_aMonitor%_#%t%_wndIds, %aWndId%`;,
|
StringReplace, View_#%Manager_aMonitor%_#%t%_wndIds, View_#%Manager_aMonitor%_#%t%_wndIds, %aWndId%`;,
|
||||||
Bar_updateView(Manager_aMonitor, t)
|
Bar_updateView(Manager_aMonitor, t)
|
||||||
If (t = Monitor_#%Manager_aMonitor%_aView_#1)
|
If (t = Monitor_#%Manager_aMonitor%_aView_#1)
|
||||||
|
@ -366,7 +366,7 @@ Monitor_toggleWindowTag(t)
|
||||||
View_#%Manager_aMonitor%_#%t%_wndIds := aWndId ";" View_#%Manager_aMonitor%_#%t%_wndIds
|
View_#%Manager_aMonitor%_#%t%_wndIds := aWndId ";" View_#%Manager_aMonitor%_#%t%_wndIds
|
||||||
View_#%Manager_aMonitor%_#%t%_aWndId := aWndId
|
View_#%Manager_aMonitor%_#%t%_aWndId := aWndId
|
||||||
Bar_updateView(Manager_aMonitor, t)
|
Bar_updateView(Manager_aMonitor, t)
|
||||||
Manager_#%aWndId%_tags += 1 << t - 1
|
Window_#%aWndId%_tags += 1 << t - 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
10
src/View.ahk
10
src/View.ahk
|
@ -52,7 +52,7 @@ View_activateWindow(d)
|
||||||
Debug_logMessage("DEBUG[2] wndId count: " . wndId0, 2, False)
|
Debug_logMessage("DEBUG[2] wndId count: " . wndId0, 2, False)
|
||||||
If (wndId0 > 1)
|
If (wndId0 > 1)
|
||||||
{
|
{
|
||||||
If Manager_#%aWndId%_isFloating
|
If Window_#%aWndId%_isFloating
|
||||||
Window_set(aWndId, "Bottom", "")
|
Window_set(aWndId, "Bottom", "")
|
||||||
Loop, % wndId0
|
Loop, % wndId0
|
||||||
{
|
{
|
||||||
|
@ -325,7 +325,7 @@ View_getTiledWndIds(m, v)
|
||||||
StringTrimRight, wndIds, View_#%m%_#%v%_wndIds, 1
|
StringTrimRight, wndIds, View_#%m%_#%v%_wndIds, 1
|
||||||
Loop, PARSE, wndIds, `;
|
Loop, PARSE, wndIds, `;
|
||||||
{
|
{
|
||||||
If Not Manager_#%A_LoopField%_isFloating And WinExist("ahk_id " A_LoopField) and Not Window_isHung(A_LoopField)
|
If Not Window_#%A_LoopField%_isFloating And WinExist("ahk_id " A_LoopField) and Not Window_isHung(A_LoopField)
|
||||||
{
|
{
|
||||||
n += 1
|
n += 1
|
||||||
tiledWndIds .= A_LoopField ";"
|
tiledWndIds .= A_LoopField ";"
|
||||||
|
@ -355,9 +355,9 @@ View_moveWindow(i=0, d=0) {
|
||||||
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
||||||
If (Config_layoutFunction_#%l% = "tile" And InStr(Manager_managedWndIds, aWndId ";") And Not (i = 0 And d = 0) And i <= View_#%m%_#%v%_area_#0) {
|
If (Config_layoutFunction_#%l% = "tile" And InStr(Manager_managedWndIds, aWndId ";") And Not (i = 0 And d = 0) And i <= View_#%m%_#%v%_area_#0) {
|
||||||
If (i = 0)
|
If (i = 0)
|
||||||
i := Manager_loop(Manager_#%aWndId%_area, d, 1, View_#%m%_#%v%_area_#0)
|
i := Manager_loop(Window_#%aWndId%_area, d, 1, View_#%m%_#%v%_area_#0)
|
||||||
Window_move(aWndId, View_#%m%_#%v%_area_#%i%_x, View_#%m%_#%v%_area_#%i%_y, View_#%m%_#%v%_area_#%i%_width, View_#%m%_#%v%_area_#%i%_height)
|
Window_move(aWndId, View_#%m%_#%v%_area_#%i%_x, View_#%m%_#%v%_area_#%i%_y, View_#%m%_#%v%_area_#%i%_width, View_#%m%_#%v%_area_#%i%_height)
|
||||||
Manager_#%aWndId%_area := i
|
Window_#%aWndId%_area := i
|
||||||
If Config_mouseFollowsFocus {
|
If Config_mouseFollowsFocus {
|
||||||
WinGetPos, aWndX, aWndY, aWndWidth, aWndHeight, ahk_id %aWndId%
|
WinGetPos, aWndX, aWndY, aWndWidth, aWndHeight, ahk_id %aWndId%
|
||||||
DllCall("SetCursorPos", "Int", Round(aWndX + aWndWidth / 2), "Int", Round(aWndY + aWndHeight / 2))
|
DllCall("SetCursorPos", "Int", Round(aWndX + aWndWidth / 2), "Int", Round(aWndY + aWndHeight / 2))
|
||||||
|
@ -735,7 +735,7 @@ View_toggleFloating()
|
||||||
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
l := View_#%Manager_aMonitor%_#%v%_layout_#1
|
||||||
If (Config_layoutFunction_#%l% And InStr(Manager_managedWndIds, aWndId ";"))
|
If (Config_layoutFunction_#%l% And InStr(Manager_managedWndIds, aWndId ";"))
|
||||||
{
|
{
|
||||||
Manager_#%aWndId%_isFloating := Not Manager_#%aWndId%_isFloating
|
Window_#%aWndId%_isFloating := Not Window_#%aWndId%_isFloating
|
||||||
View_arrange(Manager_aMonitor, v)
|
View_arrange(Manager_aMonitor, v)
|
||||||
Bar_updateTitle()
|
Bar_updateTitle()
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,8 +165,8 @@ Window_toggleDecor(wndId = 0) {
|
||||||
If (wndId = 0)
|
If (wndId = 0)
|
||||||
WinGet, wndId, ID, A
|
WinGet, wndId, ID, A
|
||||||
|
|
||||||
Manager_#%wndId%_isDecorated := Not Manager_#%wndId%_isDecorated
|
Window_#%wndId%_isDecorated := Not Window_#%wndId%_isDecorated
|
||||||
If Manager_#%wndId%_isDecorated
|
If Window_#%wndId%_isDecorated
|
||||||
Window_set(wndId, "Style", "+0xC00000")
|
Window_set(wndId, "Style", "+0xC00000")
|
||||||
Else
|
Else
|
||||||
Window_set(wndId, "Style", "-0xC00000")
|
Window_set(wndId, "Style", "-0xC00000")
|
||||||
|
|
Loading…
Reference in a new issue