summaryrefslogtreecommitdiff
path: root/eventMouse.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventMouse.go')
-rw-r--r--eventMouse.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/eventMouse.go b/eventMouse.go
index c4871ec..eb89978 100644
--- a/eventMouse.go
+++ b/eventMouse.go
@@ -43,14 +43,15 @@ func mouseDown(g *gocui.Gui, v *gocui.View) error {
w, h := g.MousePosition()
log.Info("mouseDown() stopping here. dropdwon menu is in effect")
for _, tk := range findByXY(w, h) {
- if tk.node.WidgetType == widget.Flag {
- log.Info("SENDING CLICK TO Dropdown Flag")
+ if (tk.node.WidgetType == widget.Flag) && (tk == me.dropdown.tk) {
+ log.Info("SENDING CLICK TO Flag (dropdown)")
tk.doWidgetClick(w, h)
+ me.dropdown.active = false
return nil
}
}
- log.Info("never found dropdown")
- me.dropdown.active = false
+ log.Info("never found dropdown at", w, h)
+ // me.dropdown.active = false
return nil
}