mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-03 17:18:20 -04:00
fix(tracker/gioui): avoid deadlock while changing window title
This commit is contained in:
parent
91b7850bf7
commit
773655ef9c
@ -113,14 +113,6 @@ func (t *Tracker) Main() {
|
|||||||
go eventLoop(w, events, acks)
|
go eventLoop(w, events, acks)
|
||||||
var ops op.Ops
|
var ops op.Ops
|
||||||
for {
|
for {
|
||||||
if titleFooter != t.filePathString.Value() {
|
|
||||||
titleFooter = t.filePathString.Value()
|
|
||||||
if titleFooter != "" {
|
|
||||||
w.Option(app.Title(fmt.Sprintf("Sointu Tracker - %v", titleFooter)))
|
|
||||||
} else {
|
|
||||||
w.Option(app.Title(fmt.Sprintf("Sointu Tracker")))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
select {
|
select {
|
||||||
case e := <-t.PlayerMessages:
|
case e := <-t.PlayerMessages:
|
||||||
t.ProcessPlayerMessage(e)
|
t.ProcessPlayerMessage(e)
|
||||||
@ -141,6 +133,14 @@ func (t *Tracker) Main() {
|
|||||||
go eventLoop(w, events, acks)
|
go eventLoop(w, events, acks)
|
||||||
}
|
}
|
||||||
case app.FrameEvent:
|
case app.FrameEvent:
|
||||||
|
if titleFooter != t.filePathString.Value() {
|
||||||
|
titleFooter = t.filePathString.Value()
|
||||||
|
if titleFooter != "" {
|
||||||
|
w.Option(app.Title(fmt.Sprintf("Sointu Tracker - %v", titleFooter)))
|
||||||
|
} else {
|
||||||
|
w.Option(app.Title(fmt.Sprintf("Sointu Tracker")))
|
||||||
|
}
|
||||||
|
}
|
||||||
gtx := app.NewContext(&ops, e)
|
gtx := app.NewContext(&ops, e)
|
||||||
if t.SongPanel.PlayingBtn.Bool.Value() && t.SongPanel.NoteTracking.Bool.Value() {
|
if t.SongPanel.PlayingBtn.Bool.Value() && t.SongPanel.NoteTracking.Bool.Value() {
|
||||||
t.TrackEditor.scrollTable.RowTitleList.CenterOn(t.PlaySongRow())
|
t.TrackEditor.scrollTable.RowTitleList.CenterOn(t.PlaySongRow())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user