summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-13 21:04:37 -0600
committerJeff Carr <[email protected]>2025-02-13 21:04:37 -0600
commit1f33979af9d295ab7957dca55db9be5ba19c6324 (patch)
treeae1692fac768a90c878895cedaf06f4833dfc3c8 /init.go
parent1e79d31a027e3ff7bf68bee2a139df8981db1885 (diff)
add Disable() and Enable()
Diffstat (limited to 'init.go')
-rw-r--r--init.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/init.go b/init.go
index 3a63c0a..4546b72 100644
--- a/init.go
+++ b/init.go
@@ -208,6 +208,17 @@ func waitOK() {
}
}
+// this hack is to wait for the application to send something
+// before trying to do anything. todo: rethink this someday
+func waitFirstWindow() {
+ for {
+ if me.firstWindowOk {
+ return
+ }
+ time.Sleep(10 * time.Millisecond)
+ }
+}
+
// empty function. this triggers gocui to refresh the screen
func testRefresh(*gocui.Gui) error {
// log.Info("in testRefresh")
@@ -279,10 +290,15 @@ func newWindowTrigger() {
waitOK()
time.Sleep(200 * time.Millisecond)
redoWindows(3, 3)
+ me.firstWindowOk = true
if !me.stdout.init {
me.stdout.init = true
relocateStdoutOffscreen()
}
+ if me.textbox.tk == nil {
+ initTextbox()
+ me.textbox.tk.prepTextbox()
+ }
tk.makeWindowActive()
}
}