Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request attention when Rerun Viewer is sent new recording in background #5780

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions crates/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,13 @@ impl App {
self.command_sender.send_system(SystemCommand::SetSelection(
re_viewer_context::Item::StoreId(store_id.clone()),
));

// If the viewer is in the background, tell the user that it has received something new.
egui_ctx.send_viewport_cmd(
egui::ViewportCommand::RequestUserAttention(
egui::UserAttentionType::Informational,
),
);
}
StoreKind::Blueprint => {
// We wait with activating blueprints until they are fully loaded,
Expand Down Expand Up @@ -1021,6 +1028,13 @@ impl App {
re_log::warn!("Failed to make blueprint active: {err}");
});
store_hub.set_active_app(app_id); // Switch to this app, e.g. on drag-and-drop of a blueprint file

// If the viewer is in the background, tell the user that it has received something new.
egui_ctx.send_viewport_cmd(
egui::ViewportCommand::RequestUserAttention(
egui::UserAttentionType::Informational,
),
);
}
} else {
re_log::warn!(
Expand Down
Loading