mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
81c0d5a662
commit
284d1c6b3b
6 changed files with 84 additions and 38 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue