aboutsummaryrefslogtreecommitdiff
path: root/tt.windowselect.ahk
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-04-20 01:22:49 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-04-20 01:22:49 +0200
commit04d9c5e7ab50ecc85c46048c73e78495ea2cd5a5 (patch)
treeb28fd37498189cde019a354765a1897438826d43 /tt.windowselect.ahk
parent80109204863aea43532d50afc8c537e3f651c469 (diff)
downloadahk-04d9c5e7ab50ecc85c46048c73e78495ea2cd5a5.tar.gz
windowselect: Fix input blocking
Now blocking only mouse input. Previously, keyboard input would be blocked as well, potentially preventing the Windows key from being released, leading to problems after the hotkey has been executed. Also, it turns out that some larger offset is needed to quickly restore/minimize windows by clicking on the taskbar button while only the desktop is open. So I fixed that too.
Diffstat (limited to 'tt.windowselect.ahk')
-rw-r--r--tt.windowselect.ahk6
1 files changed, 3 insertions, 3 deletions
diff --git a/tt.windowselect.ahk b/tt.windowselect.ahk
index 20c10b1..889c735 100644
--- a/tt.windowselect.ahk
+++ b/tt.windowselect.ahk
@@ -21,7 +21,7 @@ Taskbar(n)
static width := 63 ; set this to your taskbar button width
static offset := 0 ; don't change this
if (offset = 0)
- offset := 10
+ offset := 15
else
offset := 0
x := start + width*(n-1) + offset
@@ -29,9 +29,9 @@ Taskbar(n)
tmp := A_CoordModeMouse
CoordMode, Mouse, Screen
MouseGetPos, ox, oy
- BlockInput, On
+ BlockInput, MouseMove
MouseClick, Left, %x%, %A_ScreenHeight%, 1, 0
MouseMove, %ox%, %oy%, 0
- BlockInput, Off
+ BlockInput, MouseMoveOff
CoordMode, Mouse, %tmp%
}