diff --git a/0007-display-blank-surface-on-creation.patch b/0007-display-blank-surface-on-creation.patch new file mode 100644 index 0000000..c621a3f --- /dev/null +++ b/0007-display-blank-surface-on-creation.patch @@ -0,0 +1,34 @@ +From 32b123f44fc79eaad388d6be09f103457f35d734 Mon Sep 17 00:00:00 2001 +Message-Id: <32b123f44fc79eaad388d6be09f103457f35d734.1384710425.git.crobinso@redhat.com> +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Wed, 16 Oct 2013 21:00:31 +0200 +Subject: [PATCH] display: blank surface on creation + +In theory, zero-ing the surface shouldn't be necessary, as only +invalidated/painted region should be shown. However, this results in +less artifacts on resolution changes (probably some regions are painted, +but with masks, blend, copy etc), in particular on console after VM +reboot. +--- + gtk/channel-display.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/gtk/channel-display.c b/gtk/channel-display.c +index 030679b..4d55337 100644 +--- a/gtk/channel-display.c ++++ b/gtk/channel-display.c +@@ -722,9 +722,8 @@ static int create_canvas(SpiceChannel *channel, display_surface *surface) + surface->shmid = -1; + } + +- if (surface->shmid == -1) { +- surface->data = spice_malloc(surface->size); +- } ++ if (surface->shmid == -1) ++ surface->data = g_malloc0(surface->size); + + g_return_val_if_fail(c->glz_window, 0); + +-- +1.8.4.2 + diff --git a/spice-gtk.spec b/spice-gtk.spec index c2cafea..5413705 100644 --- a/spice-gtk.spec +++ b/spice-gtk.spec @@ -13,7 +13,7 @@ Name: spice-gtk Version: 0.21 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A GTK+ widget for SPICE clients Group: System Environment/Libraries @@ -29,6 +29,8 @@ Patch3: 0003-display-cache-id-is-uint64_t.patch Patch4: 0004-mono-cursor-increase-contrast-better-looking-putty-c.patch Patch5: 0005-cursor-channel.c-add-cursor-print-function-for-debug.patch Patch6: 0006-channel-cursor-mono-cursors-edge-highlighting.patch +# Fix grub graphical corruption after VM reboot (bz #1017955) +Patch0007: 0007-display-blank-surface-on-creation.patch BuildRequires: intltool BuildRequires: gtk2-devel >= 2.14 @@ -163,6 +165,8 @@ pushd spice-gtk-%{version} %patch4 -p1 %patch5 -p1 %patch6 -p1 +# Fix grub graphical corruption after VM reboot (bz #1017955) +%patch0007 -p1 find . -name '*.stamp' | xargs touch popd @@ -285,6 +289,9 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc %{_bindir}/spicy-stats %changelog +* Sun Nov 17 2013 Cole Robinson - 0.21-5 +- Fix grub graphical corruption after VM reboot (bz #1017955) + * Mon Oct 21 2013 Alon Levy - 0.21-4 - Fix mono invert only cursor contract. rhbz#998529