Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
!FIXED remains open when parent process
Browse files Browse the repository at this point in the history
~rearanged some lines
  • Loading branch information
bdeshi committed Feb 16, 2016
1 parent 8f9b38f commit 717d938
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions XYAHKLiveFilter.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ OwnCTB = %5% ;ID of associated custom toolbar button in XY (>= 0)
ShowTip = %6% ;show (once) or disable tooltip
ABPadding := (ABPadding+0 = "") ? 5 : ABPadding ;default ABPadding = 5

OnExit, ExitRoutine ;need to cleanup before exit
OnMessage(0x4a, "MsgFromXY") ;WM_COPYDATA
;OnMessage(0x200, "FocusGUI") ;WM_MOUSEMOVE | disabled, non-standard
OnExit, ExitRoutine ;need to cleanup before exit
OnMessage(0x7e, "Destroyer") ;WM_DESTROY
OnMessage(0x02, "Destroyer") ;WM_DESTROY

;setup GUI
Gui, +HwndGUIhWnd -Border -Caption +OwnDialogs +AlwaysOnTop
Expand Down Expand Up @@ -255,13 +255,14 @@ GetFont(arg_hwnd) {
ExitRoutine:
GUI, Hide ;exiting "looks" slightly faster
If WinExist("ahk_id " . XYhWnd) {
If (SyncPos = 1) ;revert AB visibility to pre-exec
WinActivate, ahk_id %XYhWnd% ;reactivate parent
If (SyncPos = 1)
;revert AB visibility to pre-exec
MsgToXY("::setlayout('showaddressbar=" ABState "');")
;make and send cleanup script
endMsg := "::filter;unset $p_XYAHKLiveFilter_A,$p_XYAHKLiveFilter_B;"
. ((OwnCTB > -1) ? "ctbstate(0, " OwnCTB ")" : "") . ";"
MsgToXY(endMsg)
WinActivate, ahk_id %XYhWnd%
}
ExitApp
Return

0 comments on commit 717d938

Please sign in to comment.