Skip to content
Browse files

displayModel, compensate for left coordinates greater than right

  • Loading branch information
Leonard de Ruijter
Leonard de Ruijter committed Jul 15, 2019
1 parent b776327 commit 0324936b23b05e55390d02c96fe303b82e7fa6df
Showing with 4 additions and 1 deletion.
  1. +4 −1 source/
@@ -181,7 +181,10 @@ def getWindowTextInRect(bindingHandle, windowHandle, left, top, right, bottom,mi
characterLocations = []
cpBufIt = iter(cpBuf)
for cp in cpBufIt:
characterLocations.append(RectLTRB(wcharToInt(cp), wcharToInt(next(cpBufIt)), wcharToInt(next(cpBufIt)), wcharToInt(next(cpBufIt))))
left, top, right, bottom = wcharToInt(cp), wcharToInt(next(cpBufIt)), wcharToInt(next(cpBufIt)), wcharToInt(next(cpBufIt))
if right < left:
left, right = right, left
characterLocations.append(RectLTRB(left, top, right, bottom))
return text, characterLocations

def getFocusRect(obj):

0 comments on commit 0324936

Please sign in to comment.
You can’t perform that action at this time.