forked from tslocum/cview
Draw only visible windows
This commit is contained in:
parent
bbe99c97ca
commit
8f11148f11
|
@ -73,7 +73,7 @@ func (wm *WindowManager) Draw(screen tcell.Screen) {
|
|||
|
||||
var hasFullScreen bool
|
||||
for _, w := range wm.windows {
|
||||
if !w.fullscreen {
|
||||
if !w.fullscreen || !w.IsVisible() {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -88,9 +88,11 @@ func (wm *WindowManager) Draw(screen tcell.Screen) {
|
|||
}
|
||||
|
||||
for _, w := range wm.windows {
|
||||
w.SetBorder(true)
|
||||
w.SetRect(x+w.x, x+w.y, w.width, w.height)
|
||||
w.Draw(screen)
|
||||
if w.IsVisible() {
|
||||
w.SetBorder(true)
|
||||
w.SetRect(x+w.x, x+w.y, w.width, w.height)
|
||||
w.Draw(screen)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue