Open
Description
Checklist
- I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
- This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
We have a window with an app tab and a label widget. The label widget is updated via goroutine after the window is shown.
The update of the label is not visible until the user hovers over the tab.
How to reproduce
See code
Screenshots
Screencast.from.01.05.2025.01.18.02.webm
Example code
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/widget"
)
func main() {
a := app.New()
w := a.NewWindow("Fyne Playground")
b := widget.NewButton("New window", func() {
w2 := a.NewWindow("Sub")
label := widget.NewLabel("")
w2.SetContent(container.NewAppTabs(
container.NewTabItem("Tab", label),
))
w2.Resize(fyne.NewSquareSize(300))
w2.Show()
go func() {
fyne.Do(func() {
label.SetText("Done")
})
}()
})
w.SetContent(container.NewCenter(b))
w.Resize(fyne.NewSquareSize(400))
w.SetMaster()
w.ShowAndRun()
}
Fyne version
2.6.0
Go compiler version
1.24.1
Operating system and version
Ubuntu 22.04 LTS
Additional Information
When adding a 1 sec delay before starting goroutine the update is sometimes shown, and sometimes we get the above described bug.
The behaviour is the exactly the same for a label and an icon.
In the Fyne app where I found this bug the behavior seems to apply to all widgets which are updated via gororutine. Both inside the tab and outside.