diff options
| author | Jeff Carr <[email protected]> | 2025-02-13 21:04:37 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-13 21:04:37 -0600 |
| commit | 1f33979af9d295ab7957dca55db9be5ba19c6324 (patch) | |
| tree | ae1692fac768a90c878895cedaf06f4833dfc3c8 /init.go | |
| parent | 1e79d31a027e3ff7bf68bee2a139df8981db1885 (diff) | |
add Disable() and Enable()
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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() } } |
