Blob Blame History Raw
From c8cb642b0f7069e0eb803d6e0c4d8a44df0c57d2 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 29 Apr 2014 13:26:26 -0400
Subject: [PATCH] snapshots: Fix screenshot with qxl+spice (bz 1089780)

(cherry picked from commit 2272166844f84943342fc097af927a09737ee57f)
---
 virtManager/snapshots.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/virtManager/snapshots.py b/virtManager/snapshots.py
index 6d4d9ac..56fdc81 100644
--- a/virtManager/snapshots.py
+++ b/virtManager/snapshots.py
@@ -379,6 +379,11 @@ class vmmSnapshotPage(vmmGObjectUI):
             return
 
         try:
+            # Perform two screenshots, because qemu + qxl has a bug where
+            # screenshot generally only shows the data from the previous
+            # screenshot request:
+            # https://bugs.launchpad.net/qemu/+bug/1314293
+            self._take_screenshot()
             mime, sdata = self._take_screenshot()
         except:
             logging.exception("Error taking screenshot")