summaryrefslogtreecommitdiffstats
path: root/gtk/spice-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/spice-widget.c')
-rw-r--r--gtk/spice-widget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 86001be..e574274 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -1632,7 +1632,7 @@ void spice_display_get_scaling(SpiceDisplay *display, double *sx, double *sy)
int fbw = d->width, fbh = d->height;
int ww, wh;
- if (!spicex_is_scaled(display)) {
+ if (!spicex_is_scaled(display) || !gtk_widget_get_window(GTK_WIDGET(display))) {
*sx = 1.0;
*sy = 1.0;
return;