Skip to contentSkip to conversation

ui: Fix default window_id value

PATCH In review Samuel Thibault 2 participants 3 messages Sep 14, 2020 – Sep 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ui: Fix default window_id value

./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.

---
It would be useful to backport this to stable trees.

ui/console.c +1 -0
index f8d7643fe4..beb733c833 100644
@@ -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;
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Samuel Thibault

./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")
Quoted 17 lines

---
It would be useful to backport this to stable trees.

ui/console.c +1 -0
index f8d7643fe4..beb733c833 100644
@@ -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;
#2 lore raw

PATCH 1/1 ui: Fix default window_id value

In reply to Samuel Thibault

./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")

---
It would be useful to backport this to stable trees.

ui/console.c +1 -0
index f8d7643fe4..beb733c833 100644
@@ -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;