Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69db35c4 authored by Ken Wakasa's avatar Ken Wakasa
Browse files

Make the buttons work for edge pixels of the keyboard

Follow-up change to If7630b89

bug: 3142416
Change-Id: I2660e3d688eb0490363e460d5b4944c89b8ca35c
parent 9dce586e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -797,7 +797,9 @@ public class LatinKeyboard extends Keyboard {
        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)));
        }
    }

+1 −1

File changed.

Contains only whitespace changes.