Permalink
Browse files

add options to control the behaviour of wp_RecenterMouse

  • Loading branch information...
artemisart committed May 24, 2015
1 parent 9714c20 commit 76f6dec556b5c3bd1e43c2114ccc4a0e035a4c1f
Showing with 17 additions and 2 deletions.
  1. +12 −2 WPXA.ahk
  2. +5 −0 WindowPadX.ini
View
@@ -724,8 +724,18 @@ Author(s):
*/
wp_RecenterMouse()
{
; should work with relative/window/client coords
WinGetPos, x, y, w, h
global RecenterMouse, RecenterOnlyIfOutside
if (RecenterMouse=0)
return
MouseGetPos, , , mID
WinGet, wID, ID
if (RecenterOnlyIfOutside and mID=wID)
return
CoordMode, Mouse, Window
WinGetPos, , , w, h
MouseMove, w / 2, h / 2
}
View
@@ -5,6 +5,11 @@
[Options]
TitleMatchMode=2
RecenterMouse=1
; when the window is moved
RecenterOnlyIfOutside=1
; recenter only if the mouse is outside the window new position
;
; [Hotkeys]: Hotkeys which are active by default.
; Hotkey sets using standard modifier keys such as

0 comments on commit 76f6dec

Please sign in to comment.