mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
ui/vnc: Do not use console_select()
console_select() is shared by other displays and a console_select() call from one of them triggers console switching also in ui/curses, circumventing key state reinitialization that needs to be performed in preparation and resulting in stuck keys. Use its internal state to track the current active console to prevent such a surprise console switch. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20240319-console-v2-2-3fd6feef321a@daynix.com>
This commit is contained in:
parent
271a197425
commit
d4c199566f
5 changed files with 39 additions and 5 deletions
12
ui/console.c
12
ui/console.c
|
@ -1325,6 +1325,18 @@ void graphic_console_close(QemuConsole *con)
|
|||
dpy_gfx_replace_surface(con, surface);
|
||||
}
|
||||
|
||||
QemuConsole *qemu_console_lookup_default(void)
|
||||
{
|
||||
QemuConsole *con;
|
||||
|
||||
QTAILQ_FOREACH(con, &consoles, next) {
|
||||
if (QEMU_IS_GRAPHIC_CONSOLE(con)) {
|
||||
return con;
|
||||
}
|
||||
}
|
||||
return QTAILQ_FIRST(&consoles);
|
||||
}
|
||||
|
||||
QemuConsole *qemu_console_lookup_by_index(unsigned int index)
|
||||
{
|
||||
QemuConsole *con;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue