mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-30 22:21:08 +01:00
Added|Changed: Fill .ws_xpixel and .ws_ypixel in winsize
This allows to get terminal size in pixel using `TIOCGWINSZ` ioctl. Set `.ws_xpixel` using `columns * cell_width` and set `.ws_ypixel` using `rows * cell_height`. Cell width and height is font width and line spacing, respectively.
This commit is contained in:
parent
a4437083a0
commit
e11ce2a833
4 changed files with 20 additions and 16 deletions
|
|
@ -975,7 +975,7 @@ public final class TerminalView extends View {
|
|||
int newRows = Math.max(4, (viewHeight - mRenderer.mFontLineSpacingAndAscent) / mRenderer.mFontLineSpacing);
|
||||
|
||||
if (mEmulator == null || (newColumns != mEmulator.mColumns || newRows != mEmulator.mRows)) {
|
||||
mTermSession.updateSize(newColumns, newRows);
|
||||
mTermSession.updateSize(newColumns, newRows, (int) mRenderer.getFontWidth(), mRenderer.getFontLineSpacing());
|
||||
mEmulator = mTermSession.getEmulator();
|
||||
mClient.onEmulatorSet();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue