diff options
| author | Jeff Carr <[email protected]> | 2025-02-03 01:11:01 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-03 01:11:01 -0600 |
| commit | 6370d87fc238480ee8b8e9476660ea64397088b1 (patch) | |
| tree | cce71a6e2b6d0e6617e3b7deb550a646404a4b59 /eventMouseMove.go | |
| parent | c5e6c66338cdf7ddbd53dd64b265ab4a041ef59a (diff) | |
closer
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 |
