diff options
| author | Jeff Carr <[email protected]> | 2025-02-06 04:47:50 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-06 04:47:50 -0600 |
| commit | 9c7b139e5ac7c0fbec70a827aab6d0d2b9a030b7 (patch) | |
| tree | 134dd43db3313fefc72f60d5520c3955130b06dc /find.go | |
| parent | d3b25092f89c86c8448f4bd088cdd128b9e28e2c (diff) | |
full screen BG widget is created. good enough to ship it
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() |
