summaryrefslogtreecommitdiff
path: root/find.go
diff options
context:
space:
mode:
Diffstat (limited to 'find.go')
-rw-r--r--find.go29
1 files changed, 16 insertions, 13 deletions
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
}