summaryrefslogtreecommitdiffstats
path: root/src/widget.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget.rs')
-rw-r--r--src/widget.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/widget.rs b/src/widget.rs
index e453679..7000cfb 100644
--- a/src/widget.rs
+++ b/src/widget.rs
@@ -203,10 +203,10 @@ pub trait Widget {
}
fn popup(&mut self) -> HResult<()> {
- self.run_widget().log();
+ let result = self.run_widget();
self.clear().log();
self.get_core()?.get_sender().send(Events::ExclusiveEvent(None))?;
- Ok(())
+ result
}
fn run_widget(&mut self) -> HResult<()> {
@@ -220,9 +220,7 @@ pub trait Widget {
for event in rx_event.iter() {
match event {
Events::InputEvent(input) => {
- if let Err(HError::PopupFinnished) = self.on_event(input) {
- return Err(HError::PopupFinnished)
- }
+ self.on_event(input)?;
}
Events::WidgetReady => {
self.refresh().log();