Skip to content

Commit

Permalink
Bound tabs area for non-maximized window
Browse files Browse the repository at this point in the history
Left and top bounds were missing for a non-maximized window.
  • Loading branch information
nurupo committed Apr 21, 2017
1 parent 09a4e7a commit b6d44df
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions chrome-mouse-wheel-tab-scroller.au3
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ Func isMouseInChromeTabsArea()
If $isWindowMaximized Then
; For some reason Chrome's Y position is -8 when the window is maximized, so if it's negative we assume it's 0
If $windowPos[1] < 0 Then $windowPos[1] = 0
Return $mousePos[1] - $windowPos[1] <= $CHROME_TABS_AREA_HEIGHT_MAXIMIZED And _
$windowPos[0] + $windowPos[2] - $mousePos[0] >= $CHROME_NONTABS_AREA_RIGHT_WIDTH_OFFSET_MAXIMIZED
Return $mousePos[1] - $windowPos[1] <= $CHROME_TABS_AREA_HEIGHT_MAXIMIZED And _ ; bottom bound
$windowPos[0] + $windowPos[2] - $mousePos[0] >= $CHROME_NONTABS_AREA_RIGHT_WIDTH_OFFSET_MAXIMIZED ; right bound
Else
Return $mousePos[1] - $windowPos[1] <= $CHROME_TABS_AREA_HEIGHT_NOT_MAXIMIZED And _
$windowPos[0] + $windowPos[2] - $mousePos[0] >= $CHROME_NONTABS_AREA_RIGHT_WIDTH_OFFSET_NOT_MAXIMIZED
Return $mousePos[1] - $windowPos[1] <= $CHROME_TABS_AREA_HEIGHT_NOT_MAXIMIZED And _ ; bottom bound
$windowPos[0] + $windowPos[2] - $mousePos[0] >= $CHROME_NONTABS_AREA_RIGHT_WIDTH_OFFSET_NOT_MAXIMIZED And _ ; right bound
$mousePos[1] >= $windowPos[1] And _ ; top bound
$mousePos[0] >= $windowPos[0] ; left bound
EndIf
EndIf
Next
Expand Down

0 comments on commit b6d44df

Please sign in to comment.