[bugfix] freeze on multi-monitor

This commit is contained in:
Klesh Wong 2021-07-22 12:31:15 +08:00
parent 689dea344d
commit 2718a2c321

View File

@ -70,11 +70,16 @@ GetCursorMonGeometry(ByRef x, ByRef y, ByRef w, ByRef h) {
loop { loop {
SysGet, mon, MonitorWorkArea, %mi% SysGet, mon, MonitorWorkArea, %mi%
if (monLeft < MouseX and monRight > MouseX) { if (monLeft < MouseX and monRight > MouseX) {
x := monLeft x := monLeft
y := monTop y := monTop
w := monRight - monLeft w := monRight - monLeft
h := monBottom - monTop h := monBottom - monTop
return return
}
mi := mi + 1
if (mi >= mc) {
MsgBox, "unable to find monitor under the cursor"
return
} }
} }
} }