diff --git a/ui/cocoa.m b/ui/cocoa.m index f20fd1ffa20e14e3f609c43e57132ecfa8608c7f..a270a464d8c134424e748bf98fec77978a3c03cd 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -404,7 +404,11 @@ QemuCocoaView *cocoaView; int w = surface_width(surface); int h = surface_height(surface); - bool isResize = (w != screen.width || h != screen.height); + /* cdx == 0 means this is our very first surface, in which case we need + * to recalculate the content dimensions even if it happens to be the size + * of the initial empty window. + */ + bool isResize = (w != screen.width || h != screen.height || cdx == 0.0); int oldh = screen.height; if (isResize) {