mirror of
https://github.com/yudai/gotty.git
synced 2026-03-04 04:40:17 +01:00
Add an option to disable client window resizes
This goes great with tmux when you are sharing your terminal for presentations and you don't want to give viewers the ability to resize your terminal
This commit is contained in:
parent
ddbaa983c0
commit
8fd09cd9ec
3 changed files with 18 additions and 2 deletions
|
|
@ -197,14 +197,24 @@ func (context *clientContext) processReceive() {
|
|||
return
|
||||
}
|
||||
|
||||
rows := uint16(context.app.options.Height)
|
||||
if rows == 0 {
|
||||
rows = uint16(args.Rows)
|
||||
}
|
||||
|
||||
columns := uint16(context.app.options.Width)
|
||||
if columns == 0 {
|
||||
columns = uint16(args.Columns)
|
||||
}
|
||||
|
||||
window := struct {
|
||||
row uint16
|
||||
col uint16
|
||||
x uint16
|
||||
y uint16
|
||||
}{
|
||||
uint16(args.Rows),
|
||||
uint16(args.Columns),
|
||||
rows,
|
||||
columns,
|
||||
0,
|
||||
0,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue