2012-09-27 20:32:27 +00:00
/*
2016-02-11 19:56:47 +00:00
: title : bug . n - - Tiling Window Management
: copyright : ( c ) 2016 by Joshua Fuhs & joten < https : / / github . com / fuhsjr00 / bug . n >
: license : GNU General Public License version 3 ;
LICENSE . md or at < http : / / www . gnu . org / licenses / >
2012-12-05 12:39:51 +00:00
2016-02-11 19:56:47 +00:00
This program is distributed in the hope that it will be useful , but WITHOUT ANY
WARRANTY ; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE .
2012-09-27 20:32:27 +00:00
* /
2011-07-27 17:43:34 +00:00
2012-12-05 12:39:51 +00:00
View_init ( m , v )
2012-10-03 21:18:17 +00:00
{
2012-09-27 20:32:27 +00:00
Global
2012-12-05 12:39:51 +00:00
2014-03-03 10:56:37 +00:00
View_# %m% _# %v% _area_#0 := 0
2015-03-07 11:14:37 +00:00
View_# %m% _# %v% _aWndIds := " 0; "
2012-09-27 20:32:27 +00:00
View_# %m% _# %v% _layout_#1 := 1
View_# %m% _# %v% _layout_#2 := 1
View_# %m% _# %v% _layoutAxis_#1 := Config_layoutAxis_#1
View_# %m% _# %v% _layoutAxis_#2 := Config_layoutAxis_#2
View_# %m% _# %v% _layoutAxis_#3 := Config_layoutAxis_#3
View_# %m% _# %v% _layoutGapWidth := Config_layoutGapWidth
View_# %m% _# %v% _layoutMFact := Config_layoutMFactor
View_# %m% _# %v% _layoutMX := 1
View_# %m% _# %v% _layoutMY := 1
View_# %m% _# %v% _layoutSymbol := Config_layoutSymbol_#1
2012-10-07 18:42:12 +00:00
View_# %m% _# %v% _margins := " 0;0;0;0 "
2014-03-03 10:56:37 +00:00
View_# %m% _# %v% _showStackArea := True
2012-10-07 18:42:12 +00:00
StringSplit , View_# %m% _# %v% _margin , View_# %m% _# %v% _margins , `;
2012-09-27 20:32:27 +00:00
View_# %m% _# %v% _wndIds := " "
2011-07-27 17:43:34 +00:00
}
2015-01-28 18:42:07 +00:00
View_activateWindow ( i , d = 0 ) {
Local aWndId , direction , failure , j , v , wndId , wndId0 , wndIds
2012-12-05 12:39:51 +00:00
2015-01-28 18:42:07 +00:00
Debug_logMessage ( " DEBUG[1] View_activateWindow( " . i . " , " . d . " ) " , 1 )
2012-09-27 20:32:27 +00:00
If ( d = 0 )
Return
2012-12-05 12:39:51 +00:00
2012-09-27 20:32:27 +00:00
WinGet , aWndId , ID , A
2012-09-28 15:46:17 +00:00
Debug_logMessage ( " DEBUG[2] Active Windows ID: " . aWndId , 2 , False )
2012-09-27 20:32:27 +00:00
v := Monitor_# %Manager_aMonitor% _aView_#1
2012-09-28 15:46:17 +00:00
Debug_logMessage ( " DEBUG[2] View ( " . v . " ) wndIds: " . View_# %Manager_aMonitor% _# %v% _wndIds , 2 , False )
2012-09-27 20:32:27 +00:00
StringTrimRight , wndIds , View_# %Manager_aMonitor% _# %v% _wndIds , 1
StringSplit , wndId , wndIds , `;
2012-09-28 15:46:17 +00:00
Debug_logMessage ( " DEBUG[2] wndId count: " . wndId0 , 2 , False )
2015-01-28 18:42:07 +00:00
If ( wndId0 > 1 ) {
2015-01-25 18:38:10 +00:00
If Window_# %aWndId% _isFloating
2015-01-25 18:16:30 +00:00
Window_set ( aWndId , " Bottom " , " " )
2015-01-28 18:42:07 +00:00
Loop , % wndId0 {
If ( wndId %A_Index% = aWndId ) {
j := A_Index
2012-09-27 20:32:27 +00:00
Break
}
2012-10-03 21:18:17 +00:00
}
2015-01-28 18:42:07 +00:00
Debug_logMessage ( " DEBUG[2] Current wndId index: " . j , 2 , False )
2012-12-05 12:39:51 +00:00
If ( d > 0 )
2012-09-27 20:32:27 +00:00
direction = 1
Else
direction = - 1
2015-01-28 18:42:07 +00:00
i := Manager_loop ( j , d , 1 , wndId0 )
Loop , % wndId0 {
Debug_logMessage ( " DEBUG[2] Next wndId index: " . i , 2 , False )
wndId := wndId %i%
2015-03-07 21:49:17 +00:00
If Not Window_# %wndId% _isMinimized {
Window_set ( wndId , " AlwaysOnTop " , " On " )
Window_set ( wndId , " AlwaysOnTop " , " Off " )
;; If there are hung windows on the screen, we still want to be able to cycle through them.
failure := Manager_winActivate ( wndId )
If Not failure
Break
}
2015-01-28 18:42:07 +00:00
i := Manager_loop ( i , direction , 1 , wndId0 )
2012-09-27 20:32:27 +00:00
}
}
2011-07-27 17:43:34 +00:00
}
2015-01-26 20:12:14 +00:00
View_addWindow ( m , v , wndId ) {
Local i , mSplit , n , replace , search
2012-12-05 12:39:51 +00:00
2015-12-23 18:09:52 +00:00
StringReplace , View_# %m% _# %v% _wndIds , View_# %m% _# %v% _wndIds , % wndId " ; " , , All
2015-01-26 20:12:14 +00:00
If Tiler_isActive ( m , v ) And ( ( Config_newWndPosition = " masterBottom " ) Or ( Config_newWndPosition = " stackTop " ) ) {
2012-10-07 12:04:27 +00:00
n := View_getTiledWndIds ( m , v )
2012-10-06 11:16:18 +00:00
mSplit := View_# %m% _# %v% _layoutMX * View_# %m% _# %v% _layoutMY
2012-12-05 12:39:51 +00:00
If ( mSplit = 1 And Config_newWndPosition = " masterBottom " )
2012-09-27 20:32:27 +00:00
View_# %m% _# %v% _wndIds := wndId " ; " . View_# %m% _# %v% _wndIds
2012-12-05 12:39:51 +00:00
Else If ( ( Config_newWndPosition = " masterBottom " And n < mSplit ) Or ( Config_newWndPosition = " stackTop " And n < = mSplit ) )
2012-09-27 20:32:27 +00:00
View_# %m% _# %v% _wndIds .= wndId " ; "
2015-01-26 20:12:14 +00:00
Else {
2012-10-04 18:05:17 +00:00
If ( Config_newWndPosition = " masterBottom " )
2012-10-06 11:16:18 +00:00
i := mSplit - 1
2012-09-27 20:32:27 +00:00
Else
2012-10-06 11:16:18 +00:00
i := mSplit
2012-10-07 12:04:27 +00:00
search := View_tiledWndId %i% " ; "
2012-09-27 20:32:27 +00:00
replace := search wndId " ; "
StringReplace , View_# %m% _# %v% _wndIds , View_# %m% _# %v% _wndIds , %search% , %replace%
}
}
Else If ( Config_newWndPosition = " bottom " )
View_# %m% _# %v% _wndIds .= wndId " ; "
Else
View_# %m% _# %v% _wndIds := wndId " ; " View_# %m% _# %v% _wndIds
2012-06-24 01:20:12 +00:00
}
2015-01-26 20:12:14 +00:00
View_arrange ( m , v , setLayout = False ) {
2012-10-07 18:42:12 +00:00
Local fn , h , l , w , x , y
2012-10-04 18:05:17 +00:00
2012-09-28 15:46:17 +00:00
Debug_logMessage ( " DEBUG[1] View_arrange( " . m . " , " . v . " ) " , 1 )
2012-12-05 12:39:51 +00:00
2012-09-27 20:32:27 +00:00
l := View_# %m% _# %v% _layout_#1
fn := Config_layoutFunction_# %l%
2015-01-26 20:12:14 +00:00
If fn {
2012-10-07 18:42:12 +00:00
x := Monitor_# %m% _x + View_# %m% _# %v% _layoutGapWidth + View_# %m% _# %v% _margin4
y := Monitor_# %m% _y + View_# %m% _# %v% _layoutGapWidth + View_# %m% _# %v% _margin1
w := Monitor_# %m% _width - 2 * View_# %m% _# %v% _layoutGapWidth - View_# %m% _# %v% _margin4 - View_# %m% _# %v% _margin2
h := Monitor_# %m% _height - 2 * View_# %m% _# %v% _layoutGapWidth - View_# %m% _# %v% _margin1 - View_# %m% _# %v% _margin3
2012-12-05 12:39:51 +00:00
2012-10-04 19:09:20 +00:00
;; All window actions are performed on independent windows. A delay won't help.
SetWinDelay , 0
2014-03-03 10:56:37 +00:00
If Config_dynamicTiling Or setLayout {
View_getTiledWndIds ( m , v )
2015-01-26 20:12:14 +00:00
If ( fn = " monocle " ) {
;; 'View_getLayoutSymbol_monocle'
View_# %m% _# %v% _layoutSymbol := " [ " View_tiledWndId0 " ] "
;; 'View_arrange_monocle'
Tiler_stackTiles ( 0 , 0 , 1 , View_tiledWndId0 , + 1 , 3 , x , y , w , h , 0 )
} Else ;; (fn = "tile")
Tiler_layoutTiles ( m , v , x , y , w , h )
2014-03-03 10:56:37 +00:00
} Else If ( fn = " tile " ) {
2015-01-26 20:12:14 +00:00
Tiler_layoutTiles ( m , v , x , y , w , h , " blank " )
2014-03-03 10:56:37 +00:00
If Config_continuouslyTraceAreas
View_traceAreas ( True )
}
2012-10-04 19:09:20 +00:00
SetWinDelay , 10
}
2012-10-06 11:16:18 +00:00
Else ;; floating layout (no 'View_arrange_', following is 'View_getLayoutSymbol_')'
2012-10-04 19:09:20 +00:00
View_# %m% _# %v% _layoutSymbol := Config_layoutSymbol_# %l%
2012-12-05 12:39:51 +00:00
2012-10-04 18:05:17 +00:00
Bar_updateLayout ( m )
2011-07-27 17:43:34 +00:00
}
2015-01-25 17:07:51 +00:00
View_getActiveWindow ( m , v ) {
2015-03-07 21:49:17 +00:00
Local listId , listIds , wndId
2015-03-07 11:14:37 +00:00
2015-03-07 21:49:17 +00:00
listIds := " aWndIds;wndIds "
2016-02-12 17:58:58 +00:00
wndId := 0
2015-03-07 21:49:17 +00:00
Loop , Parse , listIds , `;
2015-03-07 11:14:37 +00:00
{
2015-03-07 21:49:17 +00:00
listId := A_LoopField
Loop , Parse , View_# %m% _# %v% _ %listId% , `;
{
If Not A_LoopField
Break
Else If Not WinExist ( " ahk_id " A_LoopField ) Or Window_# %A_LoopField% _isMinimized
Continue
Else {
wndId := A_LoopField
Break
}
}
If wndId {
If ( listId = " wndIds " )
View_setActiveWindow ( m , v , wndId )
2015-03-07 11:14:37 +00:00
Break
}
}
2012-12-05 12:39:51 +00:00
2015-03-07 11:14:37 +00:00
Return , wndId
2012-10-14 21:16:34 +00:00
}
2012-12-05 12:39:51 +00:00
View_getTiledWndIds ( m , v )
2012-10-07 12:04:27 +00:00
{
Local n , tiledWndIds , wndIds
2012-12-05 12:39:51 +00:00
2016-02-12 17:58:58 +00:00
n := 0
tiledWndIds := " "
2012-10-07 12:04:27 +00:00
StringTrimRight , wndIds , View_# %m% _# %v% _wndIds , 1
Loop , PARSE , wndIds , `;
{
2015-01-25 18:38:10 +00:00
If Not Window_# %A_LoopField% _isFloating And WinExist ( " ahk_id " A_LoopField ) and Not Window_isHung ( A_LoopField )
2012-10-07 12:04:27 +00:00
{
n + = 1
tiledWndIds .= A_LoopField " ; "
}
}
2015-01-27 23:02:37 +00:00
View_tiledWndIds := tiledWndIds
2012-10-07 12:04:27 +00:00
StringTrimRight , tiledWndIds , tiledWndIds , 1
StringSplit , View_tiledWndId , tiledWndIds , `;
2012-12-05 12:39:51 +00:00
2012-10-07 12:04:27 +00:00
Return , n
}
2012-12-05 12:39:51 +00:00
View_ghostWindow ( m , v , bodyWndId , ghostWndId )
2012-10-04 18:05:17 +00:00
{
Local search , replace
2012-12-05 12:39:51 +00:00
2012-10-04 18:05:17 +00:00
search := bodyWndId " ; "
replace := search ghostWndId " ; "
StringReplace , View_# %m% _# %v% _wndIds , View_# %m% _# %v% _wndIds , %search% , %replace%
}
2016-01-04 19:55:18 +00:00
View_moveToIndex ( m , v , n , w ) {
Local wndIds
View_# %n% _# %w% _area_#0 := View_# %m% _# %v% _area_#0
View_# %n% _# %w% _aWndIds := View_# %m% _# %v% _aWndIds
View_# %n% _# %w% _layout_#1 := View_# %m% _# %v% _layout_#1
View_# %n% _# %w% _layout_#2 := View_# %m% _# %v% _layout_#2
View_# %n% _# %w% _layoutAxis_#1 := View_# %m% _# %v% _layoutAxis_#1
View_# %n% _# %w% _layoutAxis_#2 := View_# %m% _# %v% _layoutAxis_#2
View_# %n% _# %w% _layoutAxis_#3 := View_# %m% _# %v% _layoutAxis_#3
View_# %n% _# %w% _layoutGapWidth := View_# %m% _# %v% _layoutGapWidth
View_# %n% _# %w% _layoutMFact := View_# %m% _# %v% _layoutMFact
View_# %n% _# %w% _layoutMX := View_# %m% _# %v% _layoutMX
View_# %n% _# %w% _layoutMY := View_# %m% _# %v% _layoutMY
View_# %n% _# %w% _layoutSymbol := View_# %m% _# %v% _layoutSymbol
View_# %n% _# %w% _margins := View_# %m% _# %v% _margins
View_# %n% _# %w% _showStackArea := View_# %m% _# %v% _showStackArea
View_# %n% _# %w% _wndIds := View_# %m% _# %v% _wndIds
StringSplit , View_# %n% _# %w% _margin , View_# %n% _# %w% _margin , `;
StringTrimRight , wndIds , View_# %n% _# %w% _wndIds , 1
Loop , PARSE , wndIds , `;
{
Window_# %A_LoopField% _monitor := n
Window_# %A_LoopField% _tags - = 1 << v - 1
Window_# %A_LoopField% _tags + = 1 << w - 1
}
}
2015-07-15 20:46:00 +00:00
; @TODO: Theoretically, something is wrong here. From the hotkeys this should be manual tiling, but the function says otherwise.
2014-03-03 10:56:37 +00:00
View_moveWindow ( i = 0 , d = 0 ) {
2015-01-26 20:12:14 +00:00
Local aWndId , m , v
2014-03-03 10:56:37 +00:00
WinGet , aWndId , ID , A
m := Manager_aMonitor
v := Monitor_# %m% _aView_#1
2016-02-12 17:58:58 +00:00
If Tiler_isActive ( Manager_aMonitor , v ) And InStr ( Manager_managedWndIds , aWndId " ; " ) And Not ( i = 0 And d = 0 ) And View_# %m% _# %v% _area_#0 And ( i < = View_# %m% _# %v% _area_#0 ) {
2014-03-03 10:56:37 +00:00
If ( i = 0 )
2015-01-25 18:38:10 +00:00
i := Manager_loop ( Window_# %aWndId% _area , d , 1 , View_# %m% _# %v% _area_#0 )
2015-01-25 18:16:30 +00:00
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 )
2015-01-25 18:38:10 +00:00
Window_# %aWndId% _area := i
2015-02-05 19:57:59 +00:00
Manager_setCursor ( aWndId )
2014-03-03 10:56:37 +00:00
}
}
2015-03-06 20:28:09 +00:00
View_setActiveWindow ( m , v , wndId ) {
Global
2015-03-07 11:14:37 +00:00
If wndId {
StringReplace , View_# %m% _# %v% _aWndIds , View_# %m% _# %v% _aWndIds , % wndId " ; " , All
View_# %m% _# %v% _aWndIds := wndId " ; " View_# %m% _# %v% _aWndIds
}
2015-03-06 20:28:09 +00:00
}
2015-01-28 21:20:15 +00:00
View_setGapWidth ( i , d = 0 ) {
Local v
2012-12-05 12:39:51 +00:00
2012-09-27 20:32:27 +00:00
v := Monitor_# %Manager_aMonitor% _aView_#1
2015-01-28 21:20:15 +00:00
If ( i = 0 ) And ( d != 0 )
i := View_# %Manager_aMonitor% _# %v% _layoutGapWidth
i + = d
If ( i > = 0 And i < Monitor_# %Manager_aMonitor% _height And i < Monitor_# %Manager_aMonitor% _width ) {
i := Ceil ( i / 2 ) * 2
View_# %Manager_aMonitor% _# %v% _layoutGapWidth := i
Return , 1
} Else
Return , 0
2012-06-01 12:22:45 +00:00
}
2015-01-27 21:13:03 +00:00
View_setLayout ( i , d = 0 ) {
2012-09-27 20:32:27 +00:00
Local v
2012-12-05 12:39:51 +00:00
2012-09-27 20:32:27 +00:00
v := Monitor_# %Manager_aMonitor% _aView_#1
2015-01-27 21:13:03 +00:00
If ( i = - 1 )
i := View_# %Manager_aMonitor% _# %v% _layout_#2
Else If ( i = 0 )
i := View_# %Manager_aMonitor% _# %v% _layout_#1
i := Manager_loop ( i , d , 1 , Config_layoutCount )
If ( i > 0 ) And ( i < = Config_layoutCount ) {
If Not ( i = View_# %Manager_aMonitor% _# %v% _layout_#1 ) {
2012-09-27 20:32:27 +00:00
View_# %Manager_aMonitor% _# %v% _layout_#2 := View_# %Manager_aMonitor% _# %v% _layout_#1
2015-01-27 21:13:03 +00:00
View_# %Manager_aMonitor% _# %v% _layout_#1 := i
2012-09-27 20:32:27 +00:00
}
2014-03-03 10:56:37 +00:00
View_arrange ( Manager_aMonitor , v , True )
2012-09-27 20:32:27 +00:00
}
2011-07-27 17:43:34 +00:00
}
2015-01-27 20:30:10 +00:00
View_setLayoutProperty ( name , i , d , opt = 0 ) {
2015-01-28 21:20:15 +00:00
Local a , l , v
2012-12-05 12:39:51 +00:00
2012-10-03 21:18:17 +00:00
v := Monitor_# %Manager_aMonitor% _aView_#1
2015-01-28 21:20:15 +00:00
l := View_# %Manager_aMonitor% _# %v% _layout_#1
2015-01-26 21:51:19 +00:00
If Tiler_isActive ( Manager_aMonitor , v ) {
2015-01-27 20:30:10 +00:00
If ( name = " Axis " )
a := Tiler_setAxis ( Manager_aMonitor , v , opt , d )
Else If ( name = " MFactor " ) {
If ( opt = 0 )
2015-01-26 21:51:19 +00:00
opt := 1
2015-01-27 20:59:12 +00:00
a := Tiler_setMFactor ( Manager_aMonitor , v , i , d , opt )
2015-01-28 21:20:15 +00:00
} Else If ( name = " MX " )
2015-01-26 21:51:19 +00:00
a := Tiler_setMX ( Manager_aMonitor , v , d )
Else If ( name = " MY " )
a := Tiler_setMY ( Manager_aMonitor , v , d )
}
2015-01-28 21:20:15 +00:00
If ( name = " GapWidth " ) And ( Tiler_isActive ( Manager_aMonitor , v ) Or ( Config_layoutFunction_# %l% = " monocle " ) )
a := View_setGapWidth ( i , d )
If a
View_arrange ( Manager_aMonitor , v )
2014-03-03 10:56:37 +00:00
}
2015-01-27 23:02:37 +00:00
View_shuffleWindow ( i , d = 0 ) {
Local aWndId , j , replace , v
2012-12-05 12:39:51 +00:00
2015-01-27 23:02:37 +00:00
Debug_logMessage ( " DEBUG[2] View_shuffleWindow( " . i . " , " . d . " ) " , 2 )
2012-09-27 20:32:27 +00:00
v := Monitor_# %Manager_aMonitor% _aView_#1
2015-01-27 23:02:37 +00:00
If Tiler_isActive ( Manager_aMonitor , v ) {
2012-10-07 12:04:27 +00:00
View_getTiledWndIds ( Manager_aMonitor , v )
2015-01-27 23:02:37 +00:00
WinGet , aWndId , ID , A
If InStr ( View_tiledWndIds , aWndId " ; " ) And ( View_tiledWndId0 > 1 ) {
Loop , % View_tiledWndId0 {
If ( View_tiledWndId %A_Index% = aWndId ) {
j := A_Index
2012-09-27 20:32:27 +00:00
Break
}
2012-10-03 21:18:17 +00:00
}
2015-01-27 23:02:37 +00:00
If ( i = 0 )
i := j
Else If ( i = 1 And j = 1 )
i := 2
i := Manager_loop ( i , d , 1 , View_tiledWndId0 )
Debug_logMessage ( " DEBUG[2] View_shuffleWindow: " . j . " -> " . i , 2 )
If ( i != j ) {
If ( i < j )
replace := aWndId " ; " View_tiledWndId %i% " ; "
2012-12-05 12:39:51 +00:00
Else
2015-01-27 23:02:37 +00:00
replace := View_tiledWndId %i% " ; " aWndId " ; "
StringReplace , View_# %Manager_aMonitor% _# %v% _wndIds , View_# %Manager_aMonitor% _# %v% _wndIds , % aWndId " ; " ,
StringReplace , View_# %Manager_aMonitor% _# %v% _wndIds , View_# %Manager_aMonitor% _# %v% _wndIds , % View_tiledWndId %i% " ; " , %replace%
2012-09-27 20:32:27 +00:00
View_arrange ( Manager_aMonitor , v )
2015-02-05 19:57:59 +00:00
Manager_setCursor ( aWndId )
2012-09-27 20:32:27 +00:00
}
}
}
2011-07-27 17:43:34 +00:00
}
2015-01-25 19:28:40 +00:00
View_toggleFloatingWindow ( wndId = 0 ) {
Local l , v
2012-12-05 12:39:51 +00:00
2015-01-25 19:28:40 +00:00
If ( wndId = 0 )
WinGet , wndId , ID , A
2012-09-27 20:32:27 +00:00
v := Monitor_# %Manager_aMonitor% _aView_#1
l := View_# %Manager_aMonitor% _# %v% _layout_#1
2015-03-21 10:34:15 +00:00
Debug_logMessage ( " DEBUG[2] View_toggleFloatingWindow; wndId: " . wndId , 2 )
2015-01-25 19:28:40 +00:00
If ( Config_layoutFunction_# %l% And InStr ( Manager_managedWndIds , wndId " ; " ) ) {
Window_# %wndId% _isFloating := Not Window_# %wndId% _isFloating
2012-09-27 20:32:27 +00:00
View_arrange ( Manager_aMonitor , v )
Bar_updateTitle ( )
}
2011-07-27 17:43:34 +00:00
}
2012-10-07 18:42:12 +00:00
2012-12-05 12:39:51 +00:00
View_toggleMargins ( )
2012-10-07 18:42:12 +00:00
{
Local v
2012-12-05 12:39:51 +00:00
If Not ( Config_viewMargins = " 0;0;0;0 " )
2012-10-07 18:42:12 +00:00
{
v := Monitor_# %Manager_aMonitor% _aView_#1
2016-02-12 17:58:58 +00:00
Debug_logMessage ( " DEBUG[3] View_toggleMargins( " . View_# %Manager_aMonitor% _# %v% _margin1 . " , " . View_# %Manager_aMonitor% _# %v% _margin2 . " , " . View_# %Manager_aMonitor% _# %v% _margin3 . " , " . View_# %Manager_aMonitor% _# %v% _margin4 . " ) " , 3 )
2012-12-05 12:39:51 +00:00
If ( View_# %Manager_aMonitor% _# %v% _margins = " 0;0;0;0 " )
2012-10-07 18:42:12 +00:00
View_# %Manager_aMonitor% _# %v% _margins := Config_viewMargins
2012-12-05 12:39:51 +00:00
Else
2012-10-07 18:42:12 +00:00
View_# %Manager_aMonitor% _# %v% _margins := " 0;0;0;0 "
StringSplit , View_# %Manager_aMonitor% _# %v% _margin , View_# %Manager_aMonitor% _# %v% _margins , `;
View_arrange ( Manager_aMonitor , v )
}
}
2014-03-03 10:56:37 +00:00
View_toggleStackArea ( ) {
2015-01-26 20:12:14 +00:00
Local v
2014-03-03 10:56:37 +00:00
2015-01-26 20:12:14 +00:00
v := Monitor_# %Manager_aMonitor% _aView_#1
If Tiler_isActive ( Manager_aMonitor , v ) And Not Config_dynamicTiling {
Tiler_toggleStackArea ( Manager_aMonitor , v )
View_arrange ( Manager_aMonitor , v )
2014-03-03 10:56:37 +00:00
}
}
2015-01-26 20:12:14 +00:00
View_traceAreas ( continuously = False ) {
Local v
2014-03-03 10:56:37 +00:00
2015-01-26 20:12:14 +00:00
v := Monitor_# %Manager_aMonitor% _aView_#1
If Tiler_isActive ( Manager_aMonitor , v ) And Not Config_dynamicTiling
Tiler_traceAreas ( Manager_aMonitor , v , continuously )
2014-03-03 10:56:37 +00:00
}