summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/init.go b/init.go
index c1e8dc9..14fe610 100644
--- a/init.go
+++ b/init.go
@@ -11,6 +11,7 @@ import (
"errors"
"os"
"runtime/debug"
+ "time"
"github.com/awesome-gocui/gocui"
"go.wit.com/log"
@@ -51,6 +52,9 @@ func init() {
me.myTree.SetChecked = queueSetChecked
me.myTree.ToolkitClose = queueToolkitClose
+ me.newWindowTrigger = make(chan bool, 1)
+ go newWindowTrigger()
+
log.Log(NOW, "Init() start pluginChan")
log.Sleep(.1) // probably not needed, but in here for now under development
go mainGogui()
@@ -184,3 +188,17 @@ func gocuiMain() {
panic("gocuiTKmainloop OOPS")
}
}
+
+func newWindowTrigger() {
+ log.Log(NOW, "newWindowTriggerl() START")
+ for {
+ log.Log(NOW, "newWindowTrigger() for loop")
+ select {
+ case a := <-me.newWindowTrigger:
+ log.Log(NOW, "newWindowTrigger() got new window", a)
+ time.Sleep(200 * time.Millisecond)
+ redoWindows(1, -1)
+ log.Log(NOW, "newWindowTrigger() after sleep")
+ }
+ }
+}