Moved window filtering from code to configuration
(additional rules)
This commit is contained in:
parent
4c0c612a95
commit
f094fb25d2
2 changed files with 13 additions and 4 deletions
|
@ -110,7 +110,7 @@ Manager_applyRules(wndId, ByRef isManaged, ByRef m, ByRef tags, ByRef isFloating
|
|||
WinGetClass, wndClass, ahk_id %wndId%
|
||||
WinGetTitle, wndTitle, ahk_id %wndId%
|
||||
WinGetPos, wndX, wndY, wndWidth, wndHeight, ahk_id %wndId%
|
||||
If (wndClass Or wndTitle) And Not (wndX < -4999) And Not (wndY < -4999) {
|
||||
If (wndClass Or wndTitle) {
|
||||
Loop, % Config_ruleCount {
|
||||
;; The rules are traversed in reverse order.
|
||||
i := Config_ruleCount - A_Index + 1
|
||||
|
@ -381,9 +381,6 @@ Manager_manage(preferredMonitor, preferredView, wndId)
|
|||
tags := 1 << (preferredView - 1)
|
||||
}
|
||||
|
||||
If Window_isElevated(wndId)
|
||||
isManaged := 0
|
||||
|
||||
a := Manager__setWinProperties( wndId, isManaged, m, tags, isDecorated, isFloating, hideTitle, action)
|
||||
|
||||
; Do view placement.
|
||||
|
|
|
@ -110,6 +110,18 @@ Window_isHung(wndId) {
|
|||
Return, 0
|
||||
}
|
||||
|
||||
Window_isNotVisible(wndId) {
|
||||
WS_VISIBLE = 0x10000000
|
||||
WinGet, wndStyle, Style, ahk_id %wndId%
|
||||
If (wndStyle & WS_VISIBLE) {
|
||||
WinGetPos, wndX, wndY, wndW, wndH, ahk_id %wndId%
|
||||
hasDimensions := wndW And wndH
|
||||
isOnMonitor := Monitor_get(wndX + 5, wndY + 5) Or Monitor_get(wndX + wndW - 5, wndY + 5) Or Monitor_get(wndX + wndW, wndY + wndH - 5) Or Monitor_get(wndX + 5, wndY + wndH - 5)
|
||||
Return, (Not hasDimensions Or Not isOnMonitor)
|
||||
} Else
|
||||
Return, True
|
||||
}
|
||||
|
||||
Window_isPopup(wndId) {
|
||||
WS_POPUP = 0x80000000
|
||||
WinGet, wndStyle, Style, ahk_id %wndId%
|
||||
|
|
Loading…
Reference in a new issue