summaryrefslogtreecommitdiff
path: root/eventMouse.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventMouse.go')
-rw-r--r--eventMouse.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/eventMouse.go b/eventMouse.go
index 4ecfa57..8d88b01 100644
--- a/eventMouse.go
+++ b/eventMouse.go
@@ -52,11 +52,6 @@ func mouseDown(g *gocui.Gui, v *gocui.View) error {
var found bool = false
for _, tk := range findByXY(mx, my) {
tk.dumpWidget("mouseDown()")
- if tk.node.WidgetType == widget.Window {
- log.Info("SENDING CLICK TO WINDOW")
- tk.doWidgetClick(mx, my)
- return nil
- }
if tk.node.WidgetType == widget.Button {
log.Info("SENDING CLICK TO Button")
tk.doWidgetClick(mx, my)
@@ -67,6 +62,14 @@ func mouseDown(g *gocui.Gui, v *gocui.View) error {
tk.doWidgetClick(mx, my)
return nil
}
+ found = true
+ }
+ for _, tk := range findByXY(mx, my) {
+ if tk.node.WidgetType == widget.Window {
+ log.Info("SENDING CLICK TO WINDOW")
+ tk.doWidgetClick(mx, my)
+ return nil
+ }
if tk.node.WidgetType == widget.Label {
log.Info("IGNORE LABLE")
found = false