mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-07 01:21:09 +01:00
Do not send mouse clicks out of range (fixes #501)
This commit is contained in:
parent
50f66a12da
commit
f802d6001d
2 changed files with 14 additions and 1 deletions
|
|
@ -55,6 +55,14 @@ public class TerminalTest extends TerminalTestCase {
|
|||
assertEquals("\033[<0;3;4M", mOutput.getOutputAndClear());
|
||||
mTerminal.sendMouseEvent(TerminalEmulator.MOUSE_LEFT_BUTTON, 3, 4, false);
|
||||
assertEquals("\033[<0;3;4m", mOutput.getOutputAndClear());
|
||||
|
||||
// When the client says that a click is outside (which could happen when pixels are outside
|
||||
// the terminal area, see https://github.com/termux/termux-app/issues/501) the terminal
|
||||
// sends a click at the edge.
|
||||
mTerminal.sendMouseEvent(TerminalEmulator.MOUSE_LEFT_BUTTON, 0, 0, true);
|
||||
assertEquals("\033[<0;1;1M", mOutput.getOutputAndClear());
|
||||
mTerminal.sendMouseEvent(TerminalEmulator.MOUSE_LEFT_BUTTON, 11, 11, false);
|
||||
assertEquals("\033[<0;10;10m", mOutput.getOutputAndClear());
|
||||
}
|
||||
|
||||
public void testNormalization() throws UnsupportedEncodingException {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue