From 5675307497e2f6b75251d394a7a669734f6d3941 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Feb 2025 14:13:31 -0600 Subject: quiet output --- find.go | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'find.go') diff --git a/find.go b/find.go index 6833b9a..0cdfbfb 100644 --- a/find.go +++ b/find.go @@ -4,7 +4,6 @@ package main import ( - "fmt" "slices" "github.com/awesome-gocui/gocui" @@ -141,21 +140,23 @@ func findWindowUnderMouse() *guiWidget { // if the stdout window is on top, check it first if me.stdout.outputOnTop { if me.stdout.tk.full.inRect(w, h) { - log.Info(fmt.Sprintf("findWindowUnderMouse() found %s stdout on top (%dx%d)", me.stdout.tk.cuiName, w, h)) + // log.Info(fmt.Sprintf("findWindowUnderMouse() found %s stdout on top (%dx%d)", me.stdout.tk.cuiName, w, h)) return me.stdout.tk } } - // print out the window list - for _, tk := range me.allwin { - log.Info("findWindowUnderMouse() print:", tk.labelN, tk.window.active, tk.window.order) - } + /* + // print out the window list + for _, tk := range me.allwin { + log.Info("findWindowUnderMouse() print:", tk.labelN, tk.window.active, tk.window.order) + } + */ // now check if the active window is below the mouse for _, tk := range me.allwin { if tk.window.active { if tk.full.inRect(w, h) { - log.Info(fmt.Sprintf("findWindowUnderMouse() found %s active window (%dx%d)", tk.cuiName, w, h)) + // log.Info(fmt.Sprintf("findWindowUnderMouse() found %s active window (%dx%d)", tk.cuiName, w, h)) return tk } } @@ -167,20 +168,22 @@ func findWindowUnderMouse() *guiWidget { return a.window.order - b.window.order }) - // print out the window list - for _, tk := range me.allwin { - log.Info("findWindowUnderMouse() print:", tk.labelN, tk.window.active, tk.window.order) - } + /* + // print out the window list + for _, tk := range me.allwin { + log.Info("findWindowUnderMouse() print:", tk.labelN, tk.window.active, tk.window.order) + } + */ for _, win := range me.allwin { if win.full.inRect(w, h) { - log.Info(fmt.Sprintf("findWindowUnderMouse() found %s window (%dx%d)", win.cuiName, w, h)) + // log.Info(fmt.Sprintf("findWindowUnderMouse() found %s window (%dx%d)", win.cuiName, w, h)) return win } } // okay, no window. maybe the stdout is there? if me.stdout.tk.full.inRect(w, h) { - log.Info(fmt.Sprintf("findWindowUnderMouse() found %s stdout (%dx%d)", me.stdout.tk.cuiName, w, h)) + // log.Info(fmt.Sprintf("findWindowUnderMouse() found %s stdout (%dx%d)", me.stdout.tk.cuiName, w, h)) return me.stdout.tk } -- cgit v1.2.3