aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-04-19 23:43:45 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-04-19 23:43:58 +0200
commit80109204863aea43532d50afc8c537e3f651c469 (patch)
tree2dd40bafd969ad8c528512cdf6047703c3d09884
parentd4f1caaab6439b8b1b20244cf5a005b8d4616f58 (diff)
downloadahk-80109204863aea43532d50afc8c537e3f651c469.tar.gz
windowselect: Block input during mouse action
This prevents the user from accidentally moving taskbar buttons around, or clicking on the wrong button.
-rw-r--r--tt.windowselect.ahk2
1 files changed, 2 insertions, 0 deletions
diff --git a/tt.windowselect.ahk b/tt.windowselect.ahk
index 0f975b9..20c10b1 100644
--- a/tt.windowselect.ahk
+++ b/tt.windowselect.ahk
@@ -29,7 +29,9 @@ Taskbar(n)
tmp := A_CoordModeMouse
CoordMode, Mouse, Screen
MouseGetPos, ox, oy
+ BlockInput, On
MouseClick, Left, %x%, %A_ScreenHeight%, 1, 0
MouseMove, %ox%, %oy%, 0
+ BlockInput, Off
CoordMode, Mouse, %tmp%
}