diff options
| author | Jeff Carr <[email protected]> | 2025-02-08 09:12:35 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-08 09:12:35 -0600 |
| commit | 1923f8df96ff971ded298cc536e06f48b04d9075 (patch) | |
| tree | ded1844149e08fe9f2445454bb32ddd718e40b32 /eventMouse.go | |
| parent | b730ee945918587849ecc031ca6d84cf99d22415 (diff) | |
mouse dragging works correctly again
Diffstat (limited to 'eventMouse.go')
| -rw-r--r-- | eventMouse.go | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/eventMouse.go b/eventMouse.go index ddc0d4e..ff973c4 100644 --- a/eventMouse.go +++ b/eventMouse.go @@ -124,48 +124,6 @@ func mouseDown(g *gocui.Gui, v *gocui.View) error { } } } - if tk.node.WidgetType == widget.Stdout { - // tk.dumpWidget("stdout fixme drag()" + tk.labelN) - me.mouse.currentDrag = tk - tk.dragW = w - tk.gocuiSize.w0 - tk.dragH = h - tk.gocuiSize.h0 - return nil - } - // tk.dumpWidget("mouse drag()" + tk.labelN) me.mouse.currentDrag = tk - tk.dragW = w - tk.gocuiSize.w0 - tk.dragH = h - tk.gocuiSize.h0 - return nil -} - -/* -// this needs to go -// event triggers when you push down on a mouse button -func msgDown(g *gocui.Gui, v *gocui.View) error { - w, h := g.MousePosition() - - for _, tk := range findByXY(w, h) { - tk.dumpWidget("msgDown()") - } - - vx, vy, _, _, err := g.ViewPosition("msg") - if err == nil { - me.stdout.mouseOffsetW = w - vx - me.stdout.mouseOffsetH = h - vy - } - - // did the user click in the corner of the stdout window? If so, resize the window. - cornerW := w - vx - cornerH := h - vy - if (me.stdout.w-cornerW < 4) && (me.stdout.h-cornerH < 4) { - log.Info("Resize msg", cornerW, cornerH) - me.stdout.resize = true - } else { - log.Info("not Resize msg", cornerW, cornerH) - me.stdout.resize = false - } - log.Info("setting mousedown to true for msg") - // msgMouseDown = true return nil } -*/ |
