Skip to content

Commit

Permalink
Small change, as per code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
loops committed Sep 14, 2024
1 parent 431c98a commit 2ad8875
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions wezterm-gui/src/termwindow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,21 +1223,23 @@ impl TermWindow {
alert: Alert::Bell,
pane_id,
} => {
if self.window_contains_pane(pane_id) {
match self.config.audible_bell {
AudibleBell::SystemBeep => {
Connection::get().expect("on main thread").beep();
}
AudibleBell::Disabled => {}
if !self.window_contains_pane(pane_id) {
return Ok(());
}

match self.config.audible_bell {
AudibleBell::SystemBeep => {
Connection::get().expect("on main thread").beep();
}
AudibleBell::Disabled => {}
}

log::trace!("Ding! (this is the bell) in pane {}", pane_id);
self.emit_window_event("bell", Some(pane_id));
log::trace!("Ding! (this is the bell) in pane {}", pane_id);
self.emit_window_event("bell", Some(pane_id));

let mut per_pane = self.pane_state(pane_id);
per_pane.bell_start.replace(Instant::now());
window.invalidate();
}
let mut per_pane = self.pane_state(pane_id);
per_pane.bell_start.replace(Instant::now());
window.invalidate();
}
MuxNotification::Alert {
alert: Alert::ToastNotification { .. },
Expand Down

0 comments on commit 2ad8875

Please sign in to comment.