diff --git a/gui.go b/gui.go index 0c64e69..7ede647 100644 --- a/gui.go +++ b/gui.go @@ -751,13 +751,20 @@ func (g *Gui) MainLoop() error { } }() - if g.Mouse { - Screen.EnableMouse() - } - Screen.EnableFocus() + previousEnableMouse := false for { + if g.Mouse != previousEnableMouse { + if g.Mouse { + Screen.EnableMouse() + } else { + Screen.DisableMouse() + } + + previousEnableMouse = g.Mouse + } + err := g.processEvent() if err != nil { return err @@ -1084,7 +1091,7 @@ func (g *Gui) drawTitle(v *View, fgColor, bgColor Attribute) error { if i >= currentTabStart && i <= currentTabEnd { currentFgColor = v.SelFgColor if v != g.currentView { - currentFgColor -= AttrBold + currentFgColor &= ^AttrBold } } if err := g.SetRune(x, v.y0, ch, currentFgColor, currentBgColor); err != nil {