summaryrefslogtreecommitdiff
path: root/eventMouse.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-06 07:39:31 -0600
committerJeff Carr <[email protected]>2025-02-06 07:39:31 -0600
commitc4095ef7aa24abe780ae49cd674b7187c39cd995 (patch)
treeb2ef730479c25c896cef6234ae56be2570a9aef2 /eventMouse.go
parentc136ca2b4c33ae639af0f62f604ecdf73ea38d3e (diff)
not sure why mouse clicks are working weird
Diffstat (limited to 'eventMouse.go')
-rw-r--r--eventMouse.go6
1 files changed, 6 insertions, 0 deletions
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) {