Merge pull request #243 from Peptis/master

Added ability to change active view with mouse wheel
This commit is contained in:
joten 2020-04-10 18:52:44 +02:00 committed by GitHub
commit 2535c05dc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -498,6 +498,8 @@ Config_UI_saveSession() {
#9::Monitor_activateView(9) #9::Monitor_activateView(9)
#+9::Monitor_setWindowTag(9) #+9::Monitor_setWindowTag(9)
#^9::Monitor_toggleWindowTag(9) #^9::Monitor_toggleWindowTag(9)
~WheelUp::Manager_activateViewByMouse(-1)
~WheelDown::Manager_activateViewByMouse(+1)
;; Monitor management ;; Monitor management
#.::Manager_activateMonitor(0, +1) #.::Manager_activateMonitor(0, +1)

View file

@ -1240,3 +1240,12 @@ Manager_windowNotMaximized(width, height) {
Global Global
Return, (width < 0.99 * Monitor_#%Manager_aMonitor%_width Or height < 0.99 * Monitor_#%Manager_aMonitor%_height) 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)
}
}