aboutsummaryrefslogtreecommitdiff
path: root/hw/display/qxl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-03-15 15:45:54 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-04-16 09:26:20 +0200
commit284d1c6b3bf4ece6278f4b9831c7192e3777290c (patch)
treea768e1d5c63c5404f0c239b1488bc2935775f35c /hw/display/qxl.c
parent81c0d5a66295024d0a42e3d28efcd102a32f93c3 (diff)
console: allow pinning displaychangelisteners to consoles
DisplayChangeListener gets a new QemuConsole field, which can be set to non-NULL before registering. This will pin the QemuConsole, so that particular DisplayChangeListener will not follow console switches. spice+gtk (which don't support text console input anyway) are switched over to be pinned to console 0, which usually is the graphical display. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/qxl.c')
-rw-r--r--hw/display/qxl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 8721d44d74..bbc6f56a0d 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2061,7 +2061,6 @@ static int qxl_init_primary(PCIDevice *dev)
portio_list_add(qxl_vga_port_list, pci_address_space_io(dev), 0x3b0);
vga->con = graphic_console_init(&qxl_ops, qxl);
- qxl->ssd.con = vga->con,
qemu_spice_display_init_common(&qxl->ssd);
rc = qxl_init_common(qxl);
@@ -2070,6 +2069,7 @@ static int qxl_init_primary(PCIDevice *dev)
}
qxl->ssd.dcl.ops = &display_listener_ops;
+ qxl->ssd.dcl.con = vga->con;
ds = qemu_console_displaystate(vga->con);
register_displaychangelistener(ds, &qxl->ssd.dcl);
return rc;