fixed bug, which prevented bug.n from Main_reload, if the number of monitors changed

This commit is contained in:
joten 2012-10-14 17:59:42 +02:00
parent 7882684e74
commit 7ba6efb080
2 changed files with 13 additions and 2 deletions

View file

@ -3,3 +3,4 @@ syntax: glob
src/log.txt src/log.txt
syntax: regexp syntax: regexp
.*[cC]onfig.*\.ini .*[cC]onfig.*\.ini
.+\.\w{3}~

View file

@ -123,16 +123,26 @@ Return
Main_reload() Main_reload()
{ {
Local i Local i, m
Manager_resetWindowBorder() Manager_resetWindowBorder()
DllCall("Shell32.dll\SHAppBarMessage", "UInt", (ABM_REMOVE := 0x1), "UInt", &Bar_appBarData) DllCall("Shell32.dll\SHAppBarMessage", "UInt", (ABM_REMOVE := 0x1), "UInt", &Bar_appBarData)
;; SKAN: Crazy Scripting : Quick Launcher for Portable Apps (http://www.autohotkey.com/forum/topic22398.html) ;; SKAN: Crazy Scripting : Quick Launcher for Portable Apps (http://www.autohotkey.com/forum/topic22398.html)
Config_init() Config_init()
Manager_setWindowBorder() Manager_setWindowBorder()
Bar_getHeight() Bar_getHeight()
SysGet, m, MonitorCount
If Not (m = Manager_monitorCount)
{
MsgBox, 48, bug.n: Reload, The number of monitors changed. You should restart bug.n (by default with the hotkey Win+Ctrl+Shift+R).
If (m < Manager_monitorCount)
{
Manager_monitorCount := m
Manager_aMonitor := 1
}
}
Loop, % Manager_monitorCount Loop, % Manager_monitorCount
{ {
Monitor_getWorkArea(A_Index) Monitor_getWorkArea(A_Index)