stdout window hides on startup
This commit is contained in:
parent
9c548faeda
commit
96cb52f3ef
4
init.go
4
init.go
|
@ -204,6 +204,10 @@ func newWindowTrigger() {
|
|||
log.Log(NOW, "newWindowTrigger() got new window", a)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
redoWindows(1, -1)
|
||||
if !me.stdout.init {
|
||||
me.stdout.init = true
|
||||
relocateStdoutOffscreen()
|
||||
}
|
||||
log.Log(NOW, "newWindowTrigger() after sleep")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,6 +96,9 @@ func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View {
|
|||
}
|
||||
|
||||
func relocateStdoutOffscreen() {
|
||||
if me.stdout.tk == nil {
|
||||
return
|
||||
}
|
||||
newW := 10
|
||||
newH := 0 - me.stdout.h - 4
|
||||
me.stdout.tk.relocateStdout(newW, newH)
|
||||
|
|
|
@ -79,10 +79,11 @@ type stdout struct {
|
|||
outputOffscreen bool // is the STDOUT window offscreen?
|
||||
// offscreenW int // where to place the window offscreen
|
||||
// offscreenH int // where to place the window offscreen
|
||||
lastW int // the last 'w' location (used to move from offscreen to onscreen)
|
||||
lastH int // the last 'h' location (used to move from offscreen to onscreen)
|
||||
mouseOffsetW int // the current 'w' offset
|
||||
mouseOffsetH int // the current 'h' offset
|
||||
lastW int // the last 'w' location (used to move from offscreen to onscreen)
|
||||
lastH int // the last 'h' location (used to move from offscreen to onscreen)
|
||||
mouseOffsetW int // the current 'w' offset
|
||||
mouseOffsetH int // the current 'h' offset
|
||||
init bool // moves the window offscreen on startup
|
||||
}
|
||||
|
||||
// this is the gocui way
|
||||
|
|
Loading…
Reference in New Issue