stdout still doesn't work with the mouse correctly
This commit is contained in:
parent
16886945ed
commit
37723c2b9a
|
@ -31,6 +31,22 @@ func mouseMove(g *gocui.Gui) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// toggle off all highlight vies except for whatever is under the mouse
|
||||||
|
for _, view := range g.Views() {
|
||||||
|
view.Highlight = false
|
||||||
|
}
|
||||||
|
if v, err := g.ViewByPosition(w, h); err == nil {
|
||||||
|
v.Highlight = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// create the 'msg' view if it does not yet exist // TODO: put this somewhere more correct
|
||||||
|
if widgetView, _ := g.View("msg"); widgetView == nil {
|
||||||
|
if createStdout(g) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if me.globalMouseDown && me.dropdown.active {
|
if me.globalMouseDown && me.dropdown.active {
|
||||||
log.Info("can't drag while dropdown is active", w, h)
|
log.Info("can't drag while dropdown is active", w, h)
|
||||||
return
|
return
|
||||||
|
@ -86,20 +102,6 @@ func mouseMove(g *gocui.Gui) {
|
||||||
log.Info(fmt.Sprintf("findByXY() empty. nothing to move at (%d,%d)", w, h))
|
log.Info(fmt.Sprintf("findByXY() empty. nothing to move at (%d,%d)", w, h))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if widgetView, _ := g.View("msg"); widgetView == nil {
|
|
||||||
if createStdout(g) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, view := range g.Views() {
|
|
||||||
view.Highlight = false
|
|
||||||
}
|
|
||||||
if v, err := g.ViewByPosition(w, h); err == nil {
|
|
||||||
v.Highlight = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is how the window gets dragged around
|
// this is how the window gets dragged around
|
||||||
|
|
Loading…
Reference in New Issue