mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07: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
3
ui/gtk.c
3
ui/gtk.c
|
@ -327,7 +327,7 @@ static void gd_update(DisplayChangeListener *dcl,
|
|||
|
||||
static void gd_refresh(DisplayChangeListener *dcl)
|
||||
{
|
||||
graphic_hw_update(NULL);
|
||||
graphic_hw_update(dcl->con);
|
||||
}
|
||||
|
||||
static void gd_switch(DisplayChangeListener *dcl,
|
||||
|
@ -1368,6 +1368,7 @@ void gtk_display_init(DisplayState *ds)
|
|||
gtk_init(NULL, NULL);
|
||||
|
||||
s->dcl.ops = &dcl_ops;
|
||||
s->dcl.con = qemu_console_lookup_by_index(0);
|
||||
|
||||
s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
#if GTK_CHECK_VERSION(3, 2, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue