All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: More displaystate fallout?
Date: Thu, 29 Jan 2009 14:55:03 +0000	[thread overview]
Message-ID: <4981C347.8090906@eu.citrix.com> (raw)
In-Reply-To: <497794DA.1090405@mail.berlios.de>

I did not receive any input on this but since I believe this patch fixes
a real problem I am going to send it to the list anyway.

This patch fixes an initialization issue in case there is no graphic
card (-vga none) and the first console has a fixed size, bigger than
640x480 (-monitor 800x600).

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

---

diff --git a/console.c b/console.c
index dbb3b70..e02cf63 100644
--- a/console.c
+++ b/console.c
@@ -1419,13 +1419,22 @@ CharDriverState *text_console_init(const char *p)
 void text_consoles_set_display(DisplayState *ds)
 {
     int i;
+    TextConsole *s;
 
     for (i = 0; i < n_text_consoles; i++) {
         text_console_do_init(text_consoles[i], ds, text_console_strs[i]);
         qemu_free(text_console_strs[i]);
     }
-
     n_text_consoles = 0;
+
+    /* If there are no graphic cards and the first console has a fixed
+     * size we need to resize the screen surface according to the size
+     * of the first console */
+    s = consoles[0];
+    if (s && s->console_type == TEXT_CONSOLE_FIXED_SIZE) {
+        ds->surface = qemu_resize_displaysurface(ds->surface, s->g_width, s->g_height, 32, 4 * s->g_width);
+        dpy_resize(ds);
+    }
 }
 
 void qemu_console_resize(DisplayState *ds, int width, int height)

  parent reply	other threads:[~2009-01-29 15:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-18 23:14 [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Juergen Lock
2009-01-20 14:19 ` Jędrzej Kalinowski
2009-01-20 19:31   ` Matt
2009-01-20 23:12   ` More displaystate fallout? (was: Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...) Juergen Lock
2009-01-21 11:15     ` [Qemu-devel] Re: More displaystate fallout? (was: Re: [Qemu- devel] testing qemu svn r6367 on FreeB SD - sigev_signo; vmmouse, -vga vmware broken , slirp...) Jędrzej Kalinowski
2009-01-21 12:28       ` [Qemu-devel] Re: More displaystate fallout? Stefano Stabellini
2009-01-21 17:46         ` Stefan Weil
2009-01-21 18:15           ` Stefano Stabellini
2009-01-21 21:34             ` Stefan Weil
2009-01-22 14:11               ` Stefano Stabellini
2009-01-27 14:23                 ` Stefano Stabellini
2009-01-29 14:55               ` Stefano Stabellini [this message]
2009-01-24 11:55 ` [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Blue Swirl

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=4981C347.8090906@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.