diff options
Diffstat (limited to 'find.go')
| -rw-r--r-- | find.go | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -91,6 +91,23 @@ func (tk *guiWidget) findWindows() []*guiWidget { return found } +// find the BG widget. +// This widget is always in the background and covers the whole screen. +// gocui seems to not return mouse events unless there is something there +func (tk *guiWidget) findBG() *guiWidget { + if tk.node.WidgetType == widget.Stdout { + tk.isBG = true + return tk + } + + for _, child := range tk.children { + if found := child.findBG(); found != nil { + return found + } + } + return nil +} + // returns the "highest priority widget under the mouse func findUnderMouse() *guiWidget { w, h := me.baseGui.MousePosition() |
