improved perfs and event management

This commit is contained in:
Martino Ferrari committed 2026-10-13 23:00:42 +02:00
1 parent 667ed0c100
commit bb99be5889
17 files changed
+626 -59

No files matched your search

+14
View File
@@ -4827,6 +4827,20 @@ void on_activate(GtkApplication* application, gpointer user) {
gtk_widget_add_controller(app->window, GTK_EVENT_CONTROLLER(press));
gtk_window_present(GTK_WINDOW(app->window));
// What the window is waiting for, said *before* the first tick. The stream's first CONFIG plans
// the buffer on the producer thread, which holds the model's mutex for the whole of it -- at a few
// gigabytes that is around a second per gigabyte, and the frame tick cannot read the model while
// it runs, so the window does not change. Set here it is on screen already: the present paints a
// frame before any timeout fires, which is the difference between waiting and "the dialog
// disappeared and nothing happened".
if (app->waveform_name.empty()) {
const Config& cfg = app->model->config();
char buf[192];
std::snprintf(buf, sizeof(buf), "connecting to %s:%u -- planning the %.0f MB buffer",
cfg.server.c_str(), unsigned(cfg.port), cfg.buffer_mb);
set_notice(*app, buf, 6);
}
}
/// Headless self-check, step 2: read the panel geometry while the widgets still