mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Swap width/height in GetWinsize and monitorTtySize
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
parent
3588c5fbc7
commit
6e44246fed
2 changed files with 5 additions and 5 deletions
|
@ -283,16 +283,16 @@ func (cli *DockerCli) monitorTtySize(id string, isExec bool) error {
|
|||
|
||||
if runtime.GOOS == "windows" {
|
||||
go func() {
|
||||
prevW, prevH := cli.getTtySize()
|
||||
prevH, prevW := cli.getTtySize()
|
||||
for {
|
||||
time.Sleep(time.Millisecond * 250)
|
||||
w, h := cli.getTtySize()
|
||||
h, w := cli.getTtySize()
|
||||
|
||||
if prevW != w || prevH != h {
|
||||
cli.resizeTty(id, isExec)
|
||||
}
|
||||
prevW = w
|
||||
prevH = h
|
||||
prevW = w
|
||||
}
|
||||
}()
|
||||
} else {
|
||||
|
|
|
@ -48,8 +48,8 @@ func GetWinsize(fd uintptr) (*Winsize, error) {
|
|||
|
||||
// TODO(azlinux): Set the pixel width / height of the console (currently unused by any caller)
|
||||
return &Winsize{
|
||||
Width: uint16(info.Window.Bottom - info.Window.Top + 1),
|
||||
Height: uint16(info.Window.Right - info.Window.Left + 1),
|
||||
Width: uint16(info.Window.Right - info.Window.Left + 1),
|
||||
Height: uint16(info.Window.Bottom - info.Window.Top + 1),
|
||||
x: 0,
|
||||
y: 0}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue