Skip to content

Commit

Permalink
Added ability to change active view with mouse wheel
Browse files Browse the repository at this point in the history
... only works if mouse is over a bug.n window
  • Loading branch information
Peptis committed Apr 9, 2020
1 parent 4d17de6 commit 5b9e9a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Config.ahk
Expand Up @@ -498,6 +498,8 @@ Config_UI_saveSession() {
#9::Monitor_activateView(9)
#+9::Monitor_setWindowTag(9)
#^9::Monitor_toggleWindowTag(9)
~WheelUp::Manager_activateViewByMouse(-1)
~WheelDown::Manager_activateViewByMouse(+1)

;; Monitor management
#.::Manager_activateMonitor(0, +1)
Expand Down
9 changes: 9 additions & 0 deletions src/Manager.ahk
Expand Up @@ -1240,3 +1240,12 @@ Manager_windowNotMaximized(width, height) {
Global
Return, (width < 0.99 * Monitor_#%Manager_aMonitor%_width Or height < 0.99 * Monitor_#%Manager_aMonitor%_height)
}

Manager_activateViewByMouse(d) {
Local mousePositionX, mousePositionY, window, windowTitle
MouseGetPos, mousePositionX, mousePositionY, window
WinGetTitle windowTitle, ahk_id %Window%
if( InStr(windowTitle, "bug.n_BAR_") = 1 ) {
Monitor_activateView(0, d)
}
}

0 comments on commit 5b9e9a7

Please sign in to comment.