refactor: set_error take gui_state
insert into gui_state status when setting error
This commit is contained in:
@@ -95,16 +95,14 @@ impl InputHandler {
|
||||
} else {
|
||||
self.app_data
|
||||
.lock()
|
||||
.set_error(AppError::MouseCapture(false));
|
||||
self.gui_state.lock().status_push(Status::Error);
|
||||
.set_error(AppError::MouseCapture(false), &self.gui_state, Status::Error);
|
||||
}
|
||||
} else if Ui::enable_mouse_capture().is_ok() {
|
||||
self.gui_state
|
||||
.lock()
|
||||
.set_info_box("✓ mouse capture enabled".to_owned());
|
||||
} else {
|
||||
self.app_data.lock().set_error(AppError::MouseCapture(true));
|
||||
self.gui_state.lock().status_push(Status::Error);
|
||||
self.app_data.lock().set_error(AppError::MouseCapture(true), &self.gui_state, Status::Error);
|
||||
};
|
||||
|
||||
// If the info box sleep handle is currently being executed, as in 'm' is pressed twice within a 4000ms window
|
||||
|
||||
Reference in New Issue
Block a user