aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/cocoa.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index f20fd1f..a270a46 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) {