Fix various toggle-visible issues

- Track "start" command internally as a special mode.
- Ensure that DoubleMemPool is in good state if draw bails.
- Ensure that Launcher does not terminate daemonized session.
- Ensure that size changes cause full force redraw.
This commit is contained in:
Kenny Levinsen
2019-09-17 16:32:51 +02:00
parent f2999fb53f
commit 4ca4fa307a
3 changed files with 89 additions and 46 deletions
+5 -1
View File
@@ -19,7 +19,7 @@ impl DoubleMemPool {
pub fn pool(&mut self) -> Option<(&mut MemPool, &mut MemPool)> {
let switch = self.switch;
self.switch = !self.switch;
let (last, cur) = if switch {
let (last, cur) = if !switch {
(&mut self.pool2, &mut self.pool1)
} else {
(&mut self.pool1, &mut self.pool2)
@@ -31,4 +31,8 @@ impl DoubleMemPool {
Some((last, cur))
}
}
pub fn never_mind(&mut self) {
self.switch = !self.switch;
}
}