Fixed size window empty after restoring from minimized state
Author: adrianrudnikCreated Oct 29, 2023Updated Sep 22, 2026
LabelsbugOS:Windows
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
If SetFixedSize is used, CanvasObject do not get rendered after I restore a minimized window.
How to reproduce
Run the example code on Windows 11.
Screenshots
Example code
package main
import (
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/layout"
"image/color"
)
func main() {
a := app.New()
w := a.NewWindow("Hello")
w.CenterOnScreen()
txt := canvas.NewText("long text so minimize is visible", color.Color(color.RGBA{255, 0, 0, 255}))
c := container.New(layout.NewPaddedLayout(), container.New(layout.NewVBoxLayout(), txt))
w.SetContent(c)
w.SetFixedSize(true)
w.ShowAndRun()
}Fyne version
v2.4.1
Go compiler version
1.21.3
Operating system and version
Windows 11 22621.2506
Additional Information
Adding
w.Resize(fyne.NewSize(1, 1))after the SetFixedSize fixes it.
Source: fyne-io/fyne