summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eventBindings.go2
-rw-r--r--eventMouse.go5
-rw-r--r--find.go29
-rw-r--r--window.go17
4 files changed, 30 insertions, 23 deletions
diff --git a/eventBindings.go b/eventBindings.go
index ea91904..b59c78f 100644
--- a/eventBindings.go
+++ b/eventBindings.go
@@ -100,7 +100,7 @@ func theNotsure(g *gocui.Gui, v *gocui.View) error {
}
func tabCycleWindows(g *gocui.Gui, v *gocui.View) error {
- log.Info("try to switch windows here")
+ // log.Info("try to switch windows here")
if len(me.allwin) != len(findWindows()) {
me.allwin = findWindows()
}
diff --git a/eventMouse.go b/eventMouse.go
index 37698dc..09cfa6e 100644
--- a/eventMouse.go
+++ b/eventMouse.go
@@ -63,11 +63,11 @@ func mouseDown(g *gocui.Gui, v *gocui.View) error {
return nil
}
tk.makeWindowActive()
- log.Info("SENDING mouseDown() to findWindowUnderMouse()")
+ // log.Info("SENDING mouseDown() to findWindowUnderMouse()")
if tk.node.WidgetType == widget.Window {
// check to see if this is a direct click on a widget
for _, tk := range tk.findByXYreal(w, h) {
- tk.dumpWidget("mouseDown()")
+ // tk.dumpWidget("mouseDown()")
if tk.node.WidgetType == widget.Button {
log.Info("SENDING CLICK TO Button")
tk.doWidgetClick(w, h)
@@ -90,6 +90,7 @@ func mouseDown(g *gocui.Gui, v *gocui.View) error {
}
}
}
+ tk.dumpWidget("mouseDown() drag")
me.currentDrag = tk
tk.dragW = w - tk.gocuiSize.w0
tk.dragH = h - tk.gocuiSize.h0
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
}
diff --git a/window.go b/window.go
index a13970e..c043df3 100644
--- a/window.go
+++ b/window.go
@@ -6,7 +6,6 @@ package main
import (
"fmt"
- log "go.wit.com/log"
"go.wit.com/toolkits/tree"
"go.wit.com/widget"
)
@@ -40,14 +39,16 @@ func (tk *guiWidget) redrawWindow(w int, h int) {
tk.setFullSize()
me.baseGui.SetView(tk.cuiName, tk.gocuiSize.w0, tk.gocuiSize.h0, tk.gocuiSize.w1, tk.gocuiSize.h1, 0)
tk.Show()
+ tk.v.Clear()
+ fmt.Fprint(tk.v, "ZZZ"+tk.GetText())
tk.showWidgets()
// RE-VERIFY THIS CAN'T BE DONE IN A BETTER WAY. However, for now, this works finally so I am leaving it alone
if tk.windowFrame == nil {
tk.addWindowFrameTK(0 - tk.node.WidgetId)
- tk.windowFrame.node.State.Label = "windowFrame"
- tk.windowFrame.makeTK([]string{"windowFrame"})
+ tk.windowFrame.node.State.Label = " ZZzzzFrame" // temporary name. blank out when ready for release
+ tk.windowFrame.makeTK([]string{" ZZzzzFrame"})
}
// this seems to correctly create the window frame
@@ -143,8 +144,10 @@ func (tk *guiWidget) makeWindowActive() {
tk.window.active = true
tk.window.order = 0
- // print out the window list
- for _, tk := range me.allwin {
- log.Info("makeWindowActive() Window", tk.labelN, tk.window.active, tk.window.order)
- }
+ /*
+ // print out the window list
+ for _, tk := range me.allwin {
+ log.Info("makeWindowActive() Window", tk.labelN, tk.window.active, tk.window.order)
+ }
+ */
}