lock for now for gocui
This commit is contained in:
parent
5ebb13a454
commit
994449b1c2
4
init.go
4
init.go
|
@ -376,6 +376,7 @@ func refreshGocui() {
|
||||||
// artificially pause clock while dragging.
|
// artificially pause clock while dragging.
|
||||||
// this is a reminder to make this refresh code smarter
|
// this is a reminder to make this refresh code smarter
|
||||||
// after the switch to protocol buffers
|
// after the switch to protocol buffers
|
||||||
|
me.myTree.Lock()
|
||||||
if me.mouse.mouseUp {
|
if me.mouse.mouseUp {
|
||||||
// log.Info("refresh now on mouseUp")
|
// log.Info("refresh now on mouseUp")
|
||||||
// todo: add logic here to see if the application has changed anything
|
// todo: add logic here to see if the application has changed anything
|
||||||
|
@ -387,6 +388,7 @@ func refreshGocui() {
|
||||||
lastRefresh = time.Now()
|
lastRefresh = time.Now()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
me.myTree.Unlock()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -402,6 +404,7 @@ func newWindowTrigger() {
|
||||||
// log.Log(NOW, "newWindowTrigger() got new window", tk.cuiName)
|
// log.Log(NOW, "newWindowTrigger() got new window", tk.cuiName)
|
||||||
// time.Sleep(200 * time.Millisecond)
|
// time.Sleep(200 * time.Millisecond)
|
||||||
waitOK()
|
waitOK()
|
||||||
|
me.myTree.Lock()
|
||||||
// time.Sleep(200 * time.Millisecond)
|
// time.Sleep(200 * time.Millisecond)
|
||||||
redoWindows(me.FirstWindowW, me.FirstWindowH)
|
redoWindows(me.FirstWindowW, me.FirstWindowH)
|
||||||
me.firstWindowOk = true
|
me.firstWindowOk = true
|
||||||
|
@ -414,6 +417,7 @@ func newWindowTrigger() {
|
||||||
me.textbox.tk.prepTextbox()
|
me.textbox.tk.prepTextbox()
|
||||||
}
|
}
|
||||||
tk.makeWindowActive()
|
tk.makeWindowActive()
|
||||||
|
me.myTree.Unlock()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue