Skip to content
Open
Show file tree
Hide file tree
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
33 changes: 25 additions & 8 deletions frontends/rioterm/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,15 +789,28 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
);
}
}
RioEventType::Rio(RioEvent::Title(title)) => {
RioEventType::Rio(RioEvent::Title(route_id, _)) => {
if let Some(route) = self.router.routes.get_mut(&window_id) {
route.set_window_title(&title);
}
}
RioEventType::Rio(RioEvent::TitleWithSubtitle(title, subtitle)) => {
if let Some(route) = self.router.routes.get_mut(&window_id) {
route.set_window_title(&title);
route.set_window_subtitle(&subtitle);
let Some(is_current) = route
.window
.screen
.context_manager
.refresh_route_title(route_id)
else {
return;
};
if is_current {
let title = route
.window
.screen
.context_manager
.current()
.title
.content
.clone();
route.set_window_title(&title);
}
route.request_redraw();
}
}
RioEventType::Rio(RioEvent::UpdateTitles) => {
Expand Down Expand Up @@ -2055,6 +2068,10 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
let focus_changed = route.window.is_focused != focused;
route.window.is_focused = focused;

if focus_changed {
route.window.screen.context_manager.publish_current_title();
}

// Focus is a cheap checkpoint to catch backing-scale changes
// whose ScaleFactorChanged never arrived (sleep/wake display
// reconfiguration).
Expand Down
Loading
Loading