summaryrefslogtreecommitdiff
path: root/find.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-06 04:47:50 -0600
committerJeff Carr <[email protected]>2025-02-06 04:47:50 -0600
commit9c7b139e5ac7c0fbec70a827aab6d0d2b9a030b7 (patch)
tree134dd43db3313fefc72f60d5520c3955130b06dc /find.go
parentd3b25092f89c86c8448f4bd088cdd128b9e28e2c (diff)
full screen BG widget is created. good enough to ship it
Diffstat (limited to 'find.go')
-rw-r--r--find.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/find.go b/find.go
index b07f711..274e544 100644
--- a/find.go
+++ b/find.go
@@ -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()