From 6e44246fed43341938a41c6db9b115e1e64d332a Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Mon, 6 Apr 2015 14:31:42 -0700 Subject: [PATCH] Swap width/height in GetWinsize and monitorTtySize Signed-off-by: Ahmet Alp Balkan --- api/client/utils.go | 6 +++--- pkg/term/term_windows.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/client/utils.go b/api/client/utils.go index 3f8b91c369..cf11fefe5b 100644 --- a/api/client/utils.go +++ b/api/client/utils.go @@ -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 { diff --git a/pkg/term/term_windows.go b/pkg/term/term_windows.go index f43721c6a0..5b637928fa 100644 --- a/pkg/term/term_windows.go +++ b/pkg/term/term_windows.go @@ -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 }