diff mbox series

ui: Fix default window_id value

Message ID 20200914100637.eeommoflirxrgaeh@function
State New
Headers show
Series ui: Fix default window_id value | expand

Commit Message

Samuel Thibault Sept. 14, 2020, 10:06 a.m. UTC
./chardev/baum.c expects the default window_id value to be -1, and not 0
which could be confused with a proper window id (when numbered from 0 by
the ui backend).

This fixes getting Braille output with the curses and gtk frontends.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

---
It would be useful to backport this to stable trees.
diff mbox series

Patch

diff --git a/ui/console.c b/ui/console.c
index f8d7643fe4..beb733c833 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1310,6 +1310,7 @@  static QemuConsole *new_console(DisplayState *ds, console_type_t console_type,
     }
     s->ds = ds;
     s->console_type = console_type;
+    s->window_id = -1;
 
     if (QTAILQ_EMPTY(&consoles)) {
         s->index = 0;