Fix old Rust woes
This commit is contained in:
@ -312,9 +312,13 @@ pub mod c {
|
|||||||
Point { x: x_widget, y: y_widget }
|
Point { x: x_widget, y: y_widget }
|
||||||
);
|
);
|
||||||
|
|
||||||
let view = layout.get_current_view();
|
let state = {
|
||||||
if let Some(place) = view.find_button_by_position(point) {
|
let view = layout.get_current_view();
|
||||||
let mut state = place.button.state.clone();
|
view.find_button_by_position(point)
|
||||||
|
.map(|place| place.button.state.clone())
|
||||||
|
};
|
||||||
|
|
||||||
|
if let Some(mut state) = state {
|
||||||
layout.press_key(
|
layout.press_key(
|
||||||
&VirtualKeyboard(virtual_keyboard),
|
&VirtualKeyboard(virtual_keyboard),
|
||||||
&mut state,
|
&mut state,
|
||||||
@ -322,7 +326,7 @@ pub mod c {
|
|||||||
);
|
);
|
||||||
// maybe TODO: draw on the display buffer here
|
// maybe TODO: draw on the display buffer here
|
||||||
drawing::queue_redraw(ui_keyboard);
|
drawing::queue_redraw(ui_keyboard);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: this will work funny
|
// FIXME: this will work funny
|
||||||
|
|||||||
Reference in New Issue
Block a user