Redraw after clock.toggle().
This commit is contained in:
parent
1b76c98ea6
commit
bef717e663
2 changed files with 7 additions and 4 deletions
|
@ -158,8 +158,8 @@ impl AlarmRoster {
|
|||
}
|
||||
|
||||
// Check for active alarms.
|
||||
pub fn active(&self) -> bool {
|
||||
self.list.iter().any(|a| !a.exceeded)
|
||||
pub fn idle(&self) -> bool {
|
||||
!self.list.iter().any(|a| !a.exceeded)
|
||||
}
|
||||
|
||||
// Check for exceeded alarms.
|
||||
|
|
|
@ -77,7 +77,10 @@ pub fn run(
|
|||
layout.force_redraw = true;
|
||||
},
|
||||
// (Un-)Pause clock on SIGUSR2.
|
||||
SIGUSR2 => clock.toggle(),
|
||||
SIGUSR2 => {
|
||||
clock.toggle();
|
||||
layout.force_redraw = true;
|
||||
},
|
||||
// We didn't register anything else.
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
@ -126,7 +129,7 @@ pub fn run(
|
|||
}
|
||||
}
|
||||
// Quit if configured.
|
||||
if config.quit && !alarm_roster.active() {
|
||||
if config.quit && alarm_roster.idle() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue