From 748d66f657d961669f27003bcceb0ae78aa167a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 5 Jun 2014 21:20:20 +0200 Subject: [PATCH] cairo: disable scaling if SPICE_NOSCALE This is a RHEL-only patch for people who really don't want scaling to happen. Caveats: virt-viewer will draw unoptimal black borders (spicy seems to work better there), there are no scrollbar to scroll the display. I don't think it's worth integrating this properly in upstream, as 1:1 guest resize is what should work. https://bugzilla.redhat.com/show_bug.cgi?id=1054757 --- gtk/spice-widget-cairo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/spice-widget-cairo.c b/gtk/spice-widget-cairo.c index 3bbfaa9..f8c3e0e 100644 --- a/gtk/spice-widget-cairo.c +++ b/gtk/spice-widget-cairo.c @@ -173,5 +173,8 @@ gboolean spicex_is_scaled(SpiceDisplay *display) { SpiceDisplayPrivate *d = display->priv; + if (g_getenv("SPICE_NOSCALE")) + return FALSE; + return d->allow_scaling; } -- 1.9.3