diff options
Diffstat (limited to 'eventMouseMove.go')
| -rw-r--r-- | eventMouseMove.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/eventMouseMove.go b/eventMouseMove.go index 7c383a5..21d44fc 100644 --- a/eventMouseMove.go +++ b/eventMouseMove.go @@ -24,14 +24,12 @@ var currentDrag *guiWidget // this function uses the mouse position to highlight & unhighlight things // this is run every time the user moves the mouse over the terminal window func mouseMove(g *gocui.Gui) { - mx, my := g.MousePosition() - - w := mx - h := my + w, h := g.MousePosition() if me.supermouse { for _, tk := range findByXY(w, h) { - tk.dumpWidget("mouseMove()") + s := fmt.Sprintf("SM (%3d,%3d)", w, h) + tk.dumpWidget(s) } } @@ -79,7 +77,7 @@ func mouseMove(g *gocui.Gui) { for _, view := range g.Views() { view.Highlight = false } - if v, err := g.ViewByPosition(mx, my); err == nil { + if v, err := g.ViewByPosition(w, h); err == nil { v.Highlight = true } } @@ -105,7 +103,7 @@ func (tk *guiWidget) moveNew(g *gocui.Gui) { log.Info("NOT MOVE FLAG", tk.node.WidgetType) } tk.dumpWidget("moveNew() on " + tk.cuiName) - outputW := 140 + outputW := 180 outputH := 40 g.SetView("msg", w-xOffset, h-yOffset, w-xOffset+outputW, h-yOffset+outputH+me.FramePadH, 0) me.startOutputW = w - xOffset |
