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.
|
// Check for active alarms.
|
||||||
pub fn active(&self) -> bool {
|
pub fn idle(&self) -> bool {
|
||||||
self.list.iter().any(|a| !a.exceeded)
|
!self.list.iter().any(|a| !a.exceeded)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for exceeded alarms.
|
// Check for exceeded alarms.
|
||||||
|
|
|
@ -77,7 +77,10 @@ pub fn run(
|
||||||
layout.force_redraw = true;
|
layout.force_redraw = true;
|
||||||
},
|
},
|
||||||
// (Un-)Pause clock on SIGUSR2.
|
// (Un-)Pause clock on SIGUSR2.
|
||||||
SIGUSR2 => clock.toggle(),
|
SIGUSR2 => {
|
||||||
|
clock.toggle();
|
||||||
|
layout.force_redraw = true;
|
||||||
|
},
|
||||||
// We didn't register anything else.
|
// We didn't register anything else.
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
|
@ -126,7 +129,7 @@ pub fn run(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Quit if configured.
|
// Quit if configured.
|
||||||
if config.quit && !alarm_roster.active() {
|
if config.quit && alarm_roster.idle() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue