lock for now for gocui

This commit is contained in:
Jeff Carr 2025-03-04 04:06:36 -06:00
parent 5ebb13a454
commit 994449b1c2
1 changed files with 4 additions and 0 deletions

View File

@ -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()
}
}
}