Skip to content

Commit 669edf7

Browse files
authored
Merge pull request #5602 from andydotxyz/fix/5593
Make sure context is current when window content changes
2 parents a559222 + b509bb9 commit 669edf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/driver/glfw/window.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ func (w *window) SetContent(content fyne.CanvasObject) {
243243
if content != nil {
244244
content.Show()
245245
}
246-
async.EnsureMain(w.RescaleContext)
246+
async.EnsureMain(func() {
247+
w.RunWithContext(w.RescaleContext)
248+
})
247249
}
248250

249251
func (w *window) Canvas() fyne.Canvas {

0 commit comments

Comments
 (0)