am 69db35c4: Make the buttons work for edge pixels of the keyboard
* commit '69db35c493aa3a6a9f17094bf2180a52ffb2358e': Make the buttons work for edge pixels of the keyboardmain
commit
b5e8c77997
|
@ -797,7 +797,9 @@ public class LatinKeyboard extends Keyboard {
|
||||||
if (mCurrentlyInSpace) {
|
if (mCurrentlyInSpace) {
|
||||||
return new int[] { mSpaceKeyIndex };
|
return new int[] { mSpaceKeyIndex };
|
||||||
} else {
|
} 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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue