After some debugging I found that this is because the only time the window is updated is when a WM_MOVE happens, and it always happens when you toggle fullscreen except for this edge case. It got triggered by
QTBUG-83448 so together these issues cause a pretty big problem.
For some reason it seems to only happens if Qt::WA_TranslucentBackground is set but I haven't debugged why.
In qwindowswindow.cpp I tried to run handleGeometryChange in the end of setWindowState_sys as I noticed that a similar issue in setWindowFlags was solved this way but it seems like it was too early so I'm not quite sure what the best solution would be...
- Run the attached example.
- Try to toggle fullscreen with the toggle fullscreen button, it doesn't change the size of the window.
- Move the window with the move button.
- Try toggling fullscreen again, this time it works.