diff options
author | 2010-10-29 08:28:28 -0700 | |
---|---|---|
committer | 2010-10-29 08:28:28 -0700 | |
commit | 2a952e9b7ea738e1472cada605847e26c60f787a (patch) | |
tree | 09a5e3a600e22a4a80eb016421368327a884abfc /java/src/com/android/inputmethod/latin/LatinKeyboard.java | |
parent | c1fe5bf19d8397c0de6ddb57421e99e6a258ed1a (diff) | |
parent | b5e8c7799726a5975283fa138ad2870ab02d01a4 (diff) | |
download | latinime-2a952e9b7ea738e1472cada605847e26c60f787a.tar.gz latinime-2a952e9b7ea738e1472cada605847e26c60f787a.tar.xz latinime-2a952e9b7ea738e1472cada605847e26c60f787a.zip |
am b5e8c779: am 69db35c4: Make the buttons work for edge pixels of the keyboard
* commit 'b5e8c7799726a5975283fa138ad2870ab02d01a4':
Make the buttons work for edge pixels of the keyboard
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboard.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinKeyboard.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboard.java b/java/src/com/android/inputmethod/latin/LatinKeyboard.java index 6494bdfca..15a8cf768 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboard.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboard.java @@ -715,7 +715,9 @@ public class LatinKeyboard extends BaseKeyboard { if (mCurrentlyInSpace) { return new int[] { mSpaceKeyIndex }; } else { - return super.getNearestKeys(x, y); + // Avoid dead pixels at edges of the keyboard + return super.getNearestKeys(Math.max(0, Math.min(x, getMinWidth() - 1)), + Math.max(0, Math.min(y, getHeight() - 1))); } } |