[Spice-devel] [PATCH spice-gtk 2/2] Report the scaling is 1.0 if the widget isn't realized yet
Marc-André Lureau
marcandre.lureau at gmail.com
Tue Jan 31 14:31:07 PST 2012
To avoid a few warnings in some corner cases.
---
gtk/spice-widget.c | 2 +-
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;
--
1.7.7.6
More information about the Spice-devel
mailing list