mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 03:05:18 +08: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:
committed by
Fredrik Fornwall
parent
36d811ea7d
commit
438cd73fff
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user