From 7ce51c0cc654cd3b36b559e8556cd26becacf1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Mon, 5 Oct 2020 23:40:07 +0200 Subject: [PATCH] check close condition on poll --- crsn_screen/src/exec.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crsn_screen/src/exec.rs b/crsn_screen/src/exec.rs index e8ae861..b29da42 100644 --- a/crsn_screen/src/exec.rs +++ b/crsn_screen/src/exec.rs @@ -107,6 +107,11 @@ impl OpTrait for ScreenOp { let backend: &mut Backend = state.ext_mut(); match &mut backend.window { Some(w) => { + if !w.is_open() { + // TODO... + std::process::exit(0); + } + w.update(); } None => {