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
This commit is contained in:
Scott Shawcroft 2022-08-08 14:29:45 -07:00
parent f1826b054a
commit 401c269758
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA

View File

@ -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);
}
}