From 401c269758e3e39cc2e3bc3a88876abf7b445904 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 8 Aug 2022 14:29:45 -0700 Subject: [PATCH] Request a title bar update on USB cdc connect This ensures that the USB serial connection gets a copy of the latest title bar. Fixes #6703 --- supervisor/shared/usb/usb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index a1885448de..8f571c8e10 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -31,6 +31,7 @@ #include "supervisor/port.h" #include "supervisor/serial.h" #include "supervisor/usb.h" +#include "supervisor/shared/title_bar.h" #include "supervisor/shared/workflow.h" #include "shared/runtime/interrupt_char.h" #include "shared/readline/readline.h" @@ -242,6 +243,9 @@ void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) { if (coding.bit_rate == 1200) { reset_to_bootloader(); } + } else { + // We are connected, let's request a title bar update. + supervisor_title_bar_request_update(true); } }