summaryrefslogtreecommitdiff
path: root/eventMouse.go
diff options
context:
space:
mode:
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) {