Blame SOURCES/1000-cairo-disable-scaling-if-SPICE_NOSCALE.patch

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