From c4095ef7aa24abe780ae49cd674b7187c39cd995 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Feb 2025 07:39:31 -0600 Subject: not sure why mouse clicks are working weird --- eventMouse.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'eventMouse.go') diff --git a/eventMouse.go b/eventMouse.go index f3a223d..1757ed0 100644 --- a/eventMouse.go +++ b/eventMouse.go @@ -80,6 +80,12 @@ func mouseDown(g *gocui.Gui, v *gocui.View) error { } found = true } + if tk := findWindowUnderMouse(); tk != nil { + w, h := g.MousePosition() + tk.dragW = w - tk.gocuiSize.w0 + tk.dragH = h - tk.gocuiSize.h0 + tk.doWidgetClick(w-tk.dragW, w-tk.dragH) + } mx, my := g.MousePosition() for _, tk := range findByXY(mx, my) { -- cgit v1.2.3