diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/console.c | 4 | ||||
-rw-r--r-- | ui/gtk.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ui/console.c b/ui/console.c index b30853f6ef..28bba6de99 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1788,6 +1788,10 @@ static CharDriverState *text_console_init(ChardevVC *vc) s->chr = chr; chr->opaque = s; chr->chr_set_echo = text_console_set_echo; + /* console/chardev init sometimes completes elsewhere in a 2nd + * stage, so defer OPENED events until they are fully initialized + */ + chr->explicit_be_open = true; if (display_state) { text_console_do_init(chr, display_state); @@ -1119,6 +1119,8 @@ static CharDriverState *gd_vc_handler(ChardevVC *unused) chr = g_malloc0(sizeof(*chr)); chr->chr_write = gd_vc_chr_write; + /* defer OPENED events until our vc is fully initialized */ + chr->explicit_be_open = true; vcs[nb_vcs++] = chr; |