From 37b4ea24194e173acfd8f2f6839919be1ed8ef6f Mon Sep 17 00:00:00 2001 From: Joshua Fuhs Date: Fri, 22 Jun 2012 23:45:09 -0400 Subject: [PATCH] Correct the sign on monocle layout with gap width. --- src/Monitor.ahk | 13 +++++++------ src/View.ahk | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Monitor.ahk b/src/Monitor.ahk index 5a9e422..f22e2b2 100644 --- a/src/Monitor.ahk +++ b/src/Monitor.ahk @@ -73,16 +73,17 @@ Monitor_activateView(v) { Monitor_#%m%_aView_#1 := v Manager_hideShow := True + DetectHiddenWindows, On + View_arrange(m, v) + DetectHiddenWindows, Off + StringTrimRight, wndIds, View_#%m%_#%v%_wndIds, 1 + Loop, PARSE, wndIds, `; + WinShow, ahk_id %A_LoopField% StringTrimRight, wndIds, View_#%m%_#%aView%_wndIds, 1 Loop, PARSE, wndIds, `; 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) diff --git a/src/View.ahk b/src/View.ahk index 4b8cd01..02881cc 100644 --- a/src/View.ahk +++ b/src/View.ahk @@ -116,7 +116,7 @@ View_arrange_monocle(m, v, wndIds) { StringTrimRight, wndIds, wndIds, 1 StringSplit, wndId, wndIds, `; Loop, % wndId0 - Manager_winMove(wndId%A_Index%, Monitor_#%m%_x - gw/2, Monitor_#%m%_y - gw/2, Monitor_#%m%_width + gw, Monitor_#%m%_height + gw) + Manager_winMove(wndId%A_Index%, Monitor_#%m%_x + gw/2, Monitor_#%m%_y + gw/2, Monitor_#%m%_width - gw, Monitor_#%m%_height - gw) } View_rotateLayoutAxis(i, d) {