Swap width/height in GetWinsize and monitorTtySize

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
(cherry picked from commit 6e44246fed)
This commit is contained in:
Ahmet Alp Balkan
2015-04-06 16:55:38 -07:00
committed by Jessica Frazelle
parent c6ea062a26
commit ceb72fab34
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -281,16 +281,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 {
+2 -2
View File
@@ -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
}