qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, 1658634@bugs.launchpad.net
Subject: [Qemu-devel] [PULL v2 11/11] console: fix console resize
Date: Tue, 31 Jan 2017 16:50:31 +0100	[thread overview]
Message-ID: <1485877831-28786-12-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1485877831-28786-1-git-send-email-kraxel@redhat.com>

Only skip surface reallocation in case the old surface was created using
qemu_alloc_display (via qemu_create_displaysurface) too, otherwise we
might end up with a DisplaySurface with the wrong backing storage.

Cc: 1658634@bugs.launchpad.net
Fixes: cd958edb1fae85d0c7d1e1acbff82d22724e8d64
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1485256239-12219-1-git-send-email-kraxel@redhat.com
---
 ui/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/console.c b/ui/console.c
index fe03a66..e353c85 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2116,7 +2116,7 @@ void qemu_console_resize(QemuConsole *s, int width, int height)
 
     assert(s->console_type == GRAPHIC_CONSOLE);
 
-    if (s->surface &&
+    if (s->surface && (s->surface->flags & QEMU_ALLOCATED_FLAG) &&
         pixman_image_get_width(s->surface->image) == width &&
         pixman_image_get_height(s->surface->image) == height) {
         return;
-- 
1.8.3.1

  parent reply	other threads:[~2017-01-31 15:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 15:50 [Qemu-devel] [PULL v2 00/11] ui patch queue Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 01/11] qapi: add support for mice with extra/side buttons Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 02/11] ps2: " Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 03/11] ui: " Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 04/11] vnc: track LED state separately Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 05/11] ui/gtk: Fix mouse wheel on 3.4.0 or later Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 06/11] ui: fix format specfier in vnc to avoid break in build Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 07/11] ui/gtk.c: add ctrl-alt-= support for zoom in acceleration Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 08/11] spice: wakeup QXL worker to pick up mouse changes Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 09/11] vnc: fix overflow in vnc_update_stats Gerd Hoffmann
2017-01-31 15:50 ` [Qemu-devel] [PULL v2 10/11] gtk: Hardcode LC_CTYPE as C.utf-8 Gerd Hoffmann
2017-01-31 15:50 ` Gerd Hoffmann [this message]
2017-01-31 16:22 ` [Qemu-devel] [PULL v2 00/11] ui patch queue Peter Maydell
2017-01-31 16:34   ` Gerd Hoffmann
2017-02-02  9:49 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485877831-28786-12-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=1658634@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).