diff options
Diffstat (limited to 'toolkit')
| -rw-r--r-- | toolkit/gocui/click.go | 4 | ||||
| -rw-r--r-- | toolkit/gocui/debug.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/toolkit/gocui/click.go b/toolkit/gocui/click.go index 8e9f2f7..e32825a 100644 --- a/toolkit/gocui/click.go +++ b/toolkit/gocui/click.go @@ -125,7 +125,8 @@ func ctrlDown(g *gocui.Gui, v *gocui.View) error { // find buttons that are below where the mouse button click f = func(widget *cuiWidget) { // if ((widget.logicalSize.w0 < w) && (w < widget.logicalSize.w1)) { - if ((widget.realSize.w0 < w) && (w < widget.realSize.w1)) { + if ((widget.realSize.w0 < w) && (w < widget.realSize.w1) && + (widget.realSize.h0 < h) && (h < widget.realSize.h1)) { widgets = append(widgets, widget) found = widget } @@ -151,6 +152,7 @@ func ctrlDown(g *gocui.Gui, v *gocui.View) error { if (found == nil) { found = me.rootNode } + found.updateLogicalSizes() me.ctrlDown.realSize.w0 = found.logicalSize.w0 me.ctrlDown.realSize.w1 = found.logicalSize.w1 me.ctrlDown.realSize.h0 = found.logicalSize.h0 diff --git a/toolkit/gocui/debug.go b/toolkit/gocui/debug.go index e79b1be..0573f70 100644 --- a/toolkit/gocui/debug.go +++ b/toolkit/gocui/debug.go @@ -42,9 +42,7 @@ func (w *cuiWidget) showWidgetPlacement(b bool, s string) { return } if (w.parent == nil) { - log(logError, "showWidgetPlacement() WTF parent == nil", w.id, w.cuiName) - log(logError, "showWidgetPlacement() WTF parent == nil", w.id, w.cuiName) - log(logError, "showWidgetPlacement() WTF parent == nil", w.id, w.cuiName) + log(logError, "showWidgetPlacement() ERROR parent == nil", w.id, w.cuiName) } log(b, "dump()", s, fmt.Sprintf("(wId,pId)=(%3d,%3d)", w.id, w.parent.id), |
