From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH v5 01/10] Use display types for local display only.
Date: Tue, 31 Aug 2010 16:32:19 +0200 [thread overview]
Message-ID: <1283265148-15977-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1283265148-15977-1-git-send-email-kraxel@redhat.com>
This patch drops DT_VNC. The display types are only used to select
select the local display (i.e. curses, sdl, coca, ...). Remote
displays (for now only vnc, spice will follow) can be enabled
independently.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
sysemu.h | 1 -
vl.c | 24 +++++++++++++-----------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/sysemu.h b/sysemu.h
index a1f6466..b81a70e 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -94,7 +94,6 @@ typedef enum DisplayType
DT_DEFAULT,
DT_CURSES,
DT_SDL,
- DT_VNC,
DT_NOGRAPHIC,
} DisplayType;
diff --git a/vl.c b/vl.c
index 91d1684..d90b275 100644
--- a/vl.c
+++ b/vl.c
@@ -172,6 +172,7 @@ static const char *data_dir;
const char *bios_name = NULL;
enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
DisplayType display_type = DT_DEFAULT;
+int display_remote = 0;
const char* keyboard_layout = NULL;
ram_addr_t ram_size;
const char *mem_path = NULL;
@@ -2468,7 +2469,7 @@ int main(int argc, char **argv, char **envp)
}
break;
case QEMU_OPTION_vnc:
- display_type = DT_VNC;
+ display_remote++;
vnc_display = optarg;
break;
case QEMU_OPTION_no_acpi:
@@ -2898,17 +2899,17 @@ int main(int argc, char **argv, char **envp)
/* just use the first displaystate for the moment */
ds = get_displaystate();
- if (display_type == DT_DEFAULT) {
+ if (display_type == DT_DEFAULT && !display_remote) {
#if defined(CONFIG_SDL) || defined(CONFIG_COCOA)
display_type = DT_SDL;
#else
- display_type = DT_VNC;
vnc_display = "localhost:0,to=99";
show_vnc_port = 1;
#endif
}
+ /* init local displays */
switch (display_type) {
case DT_NOGRAPHIC:
break;
@@ -2926,7 +2927,12 @@ int main(int argc, char **argv, char **envp)
cocoa_display_init(ds, full_screen);
break;
#endif
- case DT_VNC:
+ default:
+ break;
+ }
+
+ /* init remote displays */
+ if (vnc_display) {
vnc_display_init(ds);
if (vnc_display_open(ds, vnc_display) < 0)
exit(1);
@@ -2934,12 +2940,10 @@ int main(int argc, char **argv, char **envp)
if (show_vnc_port) {
printf("VNC server running on `%s'\n", vnc_display_local_addr(ds));
}
- break;
- default:
- break;
}
- dpy_resize(ds);
+ /* display setup */
+ dpy_resize(ds);
dcl = ds->listeners;
while (dcl != NULL) {
if (dcl->dpy_refresh != NULL) {
@@ -2949,12 +2953,10 @@ int main(int argc, char **argv, char **envp)
}
dcl = dcl->next;
}
-
- if (display_type == DT_NOGRAPHIC || display_type == DT_VNC) {
+ if (ds->gui_timer == NULL) {
nographic_timer = qemu_new_timer(rt_clock, nographic_update, NULL);
qemu_mod_timer(nographic_timer, qemu_get_clock(rt_clock));
}
-
text_consoles_set_display(ds);
if (gdbstub_dev && gdbserver_start(gdbstub_dev) < 0) {
--
1.7.1
next prev parent reply other threads:[~2010-08-31 14:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 14:32 [Qemu-devel] [PATCH v5 00/10] initial spice support Gerd Hoffmann
2010-08-31 14:32 ` Gerd Hoffmann [this message]
2010-08-31 14:32 ` [Qemu-devel] [PATCH v5 02/10] Use machine_init() to register virtfs config options Gerd Hoffmann
2010-08-31 14:32 ` [Qemu-devel] [PATCH v5 03/10] add pflib: PixelFormat conversion library Gerd Hoffmann
2010-08-31 14:32 ` [Qemu-devel] [PATCH v5 04/10] configure: add logging Gerd Hoffmann
2010-08-31 14:32 ` [Qemu-devel] [PATCH v5 05/10] add spice into the configure file Gerd Hoffmann
2010-08-31 14:32 ` [Qemu-devel] [PATCH v5 06/10] spice: core bits Gerd Hoffmann
2010-08-31 14:32 ` [Qemu-devel] [PATCH v5 07/10] spice: add keyboard Gerd Hoffmann
2010-08-31 14:32 ` [Qemu-devel] [PATCH v5 08/10] spice: add mouse Gerd Hoffmann
2010-08-31 14:32 ` [Qemu-devel] [PATCH v5 09/10] spice: simple display Gerd Hoffmann
2010-08-31 14:32 ` [Qemu-devel] [PATCH v5 10/10] spice: add tablet support Gerd Hoffmann
2010-08-31 16:22 ` [Qemu-devel] [PATCH v5 00/10] initial spice support Anthony Liguori
2010-08-31 18:23 ` 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=1283265148-15977-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.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 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).