Lots of logging changes

This commit is contained in:
Joshua Fuhs 2012-06-26 12:52:44 -04:00
parent b36b640aad
commit 315b1bfae4
4 changed files with 45 additions and 10 deletions

View File

@ -390,7 +390,9 @@ Config_saveSession() {
#+x::Manager_maximizeWindow() ; Move and resize the active window to the size of the work area (only floating windows).
#i::Manager_getWindowInfo() ; Get information for the active window (id, title, class, process name, style, geometry, tags and floating state).
#+i::Manager_getWindowList() ; Get a window list for the active view (id, title and class).
#^i::Manager_logWindowList()
#^i::Manager_logViewWindowList()
;#+^::Manager_logWindowList()
#^h::Manager_logHelp()
#^d::Log_decDebugLevel()
#^e::Log_incDebugLevel()

View File

@ -232,8 +232,12 @@ Manager_getWindowList() {
Clipboard := text
}
Manager_logViewLayout() {
}
Manager_logWindowInfo( w ) {
Local av, aWndId, aIsWinFocus, aIsBugnActive, aIsFloating, aIsHidden, aWndTitle, aWndStyle, aWndX, aWndY, aWndW, aWndH
Local av, aWndId, aIsWinFocus, aIsBugnActive, aIsFloating, aIsHidden, aIsDecorated, aWndTitle, aWndStyle, aWndX, aWndY, aWndW, aWndH
WinGet, aWndId, ID, A
If aWndId = %w%
@ -254,18 +258,25 @@ Manager_logWindowInfo( w ) {
aIsFloating := "*"
Else
aIsFloating := " "
If Manager_#%w%_isDecorated
aIsDecorated := "*"
Else
aIsDecorated := " "
WinGet, aWndStyle, Style, ahk_id %w%
WinGetPos, aWndX, aWndY, aWndW, aWndH, ahk_id %w%
Log_bare(w . "`t" . aIsBugnActive . " " . aIsFloating . " " . aIsHidden . " " aIsWinFocus . "`t" . aWndX . "`t" . aWndY . "`t" . aWndW . "`t" . aWndH . "`t" . aWndStyle . "`t" . aWndTitle)
;Manager_#%wndId%_monitor := m
;Manager_#%wndId%_tags := tags
;Manager_#%wndId%_isDecorated := isDecorated
;Manager_#%wndId%_isFloating := isFloating
Log_bare(w . "`t" . aIsHidden . " " aIsWinFocus . " " . aIsBugnActive . " " . aIsFloating . " " . aIsDecorated . " " . Manager_#%w%_monitor . "`t" . Manager_#%w%_tags . "`t" . aWndX . "`t" . aWndY . "`t" . aWndW . "`t" . aWndH . "`t" . aWndStyle . "`t" . aWndTitle)
}
Manager_logWindowList() {
Manager_logViewWindowList() {
Local text, v, aWndId, wndIds, aWndTitle
v := Monitor_#%Manager_aMonitor%_aView_#1
Log_msg( "Window dump for active view (" . Manager_aMonitor . ", " . v . ")" )
Log_bare( "ID`t`tA F H W`tX`tY`tW`tH`tStyle`t`tTitle")
Log_bare( "ID`t`tH W A F D M`tTags`tX`tY`tW`tH`tStyle`t`tTitle")
StringTrimRight, wndIds, View_#%Manager_aMonitor%_#%v%_wndIds, 1
Loop, PARSE, wndIds, `;
@ -274,6 +285,25 @@ Manager_logWindowList() {
}
}
Manager_logHelp() {
Log_msg("Help Display")
Log_bare("Window list columns")
Log_bare(" ID - Windows ID")
Log_bare(" H - Hidden")
Log_bare(" W - Windows active")
Log_bare(" A - View active")
Log_bare(" F - Floating")
Log_bare(" D - Decorated")
Log_bare(" M - Monitor")
Log_bare(" Tags - Bit-mask of the views in which the window is active")
Log_bare(" X - Windows X position")
Log_bare(" Y - Windows Y position")
Log_bare(" W - Windows width")
Log_bare(" H - Windows height")
Log_bare(" Style - Windows style")
Log_bare(" Title - Title of the window")
}
Manager_lockWorkStation() {
Global Config_shellMsgDelay
@ -394,12 +424,15 @@ Manager_moveWindow() {
}
HSHELL_WINDOWCREATED := 1
; Seems to get sent every time
; Seems to get sent sometimes when windows are deactivated.
HSHELL_WINDOWDESTROYED := 2
HSHELL_WINDOWACTIVATED := 4
; At least title change.
HSHELL_REDRAW := 6
; Full-screen app activated?
; Full-screen app activated? Root-privileged window activated?
HSHELL_RUDEAPPACTIVATED := 32772
; When a window is signalling an application update.
WINDOW_NOTICE := 32774
Manager_onShellMessage(wParam, lParam) {
Local a, isChanged, aWndClass, aWndHeight, aWndId, aWndTitle, aWndWidth, aWndX, aWndY, m, t, wndClass, wndId, wndIds, wndPName, wndTitle, x, y

View File

@ -41,7 +41,7 @@ Monitor_activateView(v) {
Else If (v = "<")
v := Manager_loop(Monitor_#%Manager_aMonitor%_aView_#1, -1, 1, Config_viewCount)
;Log_msg("Monitor_activateView(" . v . ") wndIds: " . View_#%m%_#%aView%_wndIds)
Log_dbg_msg(1, "Monitor_activateView(" . v . ") Manager_aMonitor: " . Manager_aMonitor . "; wndIds: " . View_#%m%_#%aView%_wndIds)
If (v <= 0) Or (v > Config_viewCount) Or Manager_hideShow
Return

View File

@ -108,7 +108,7 @@ View_delWnd(m, v, wndId) {
View_arrange(m, v) {
Local fn, l, wndIds
Log_dbg_msg(1, "View_arrange(" . m . ", " . v . ")")
; All window actions are performed on independent windows. A delay won't help.
SetWinDelay, 0
l := View_#%m%_#%v%_layout_#1