ui: Fix default window_id value
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 14 Sep 2020 10:06:37 +0000 (12:06 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 14 Oct 2020 08:20:26 +0000 (10:20 +0200)
./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.

Fixes: f29b3431f62 ("console: move window ID code from baum to sdl")
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200914100637.eeommoflirxrgaeh@function>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/console.c

index 54a74c0b16c9d3fc91aa5290547d4c6557995a41..820e4081709db252ad08b274f0b8806d56d6f7c6 100644 (file)
@@ -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;