summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/init.go b/init.go
index e549b18..291020c 100644
--- a/init.go
+++ b/init.go
@@ -376,6 +376,7 @@ func refreshGocui() {
// artificially pause clock while dragging.
// this is a reminder to make this refresh code smarter
// after the switch to protocol buffers
+ me.myTree.Lock()
if me.mouse.mouseUp {
// log.Info("refresh now on mouseUp")
// todo: add logic here to see if the application has changed anything
@@ -387,6 +388,7 @@ func refreshGocui() {
lastRefresh = time.Now()
}
}
+ me.myTree.Unlock()
}
}
}
@@ -402,6 +404,7 @@ func newWindowTrigger() {
// log.Log(NOW, "newWindowTrigger() got new window", tk.cuiName)
// time.Sleep(200 * time.Millisecond)
waitOK()
+ me.myTree.Lock()
// time.Sleep(200 * time.Millisecond)
redoWindows(me.FirstWindowW, me.FirstWindowH)
me.firstWindowOk = true
@@ -414,6 +417,7 @@ func newWindowTrigger() {
me.textbox.tk.prepTextbox()
}
tk.makeWindowActive()
+ me.myTree.Unlock()
}
}
}