Actually set the input handler
This commit is contained in:
parent
9a022671a2
commit
8278a07354
1 changed files with 3 additions and 2 deletions
|
@ -235,7 +235,6 @@ pub(crate) struct Frame {
|
||||||
content_mask_stack: Vec<ContentMask<Pixels>>,
|
content_mask_stack: Vec<ContentMask<Pixels>>,
|
||||||
element_offset_stack: Vec<Point<Pixels>>,
|
element_offset_stack: Vec<Point<Pixels>>,
|
||||||
focus_stack: Vec<FocusId>,
|
focus_stack: Vec<FocusId>,
|
||||||
input_handler: Option<Box<dyn PlatformInputHandler>>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Window {
|
impl Window {
|
||||||
|
@ -2177,7 +2176,9 @@ impl<'a, V: 'static> ViewContext<'a, V> {
|
||||||
input_handler: impl PlatformInputHandler,
|
input_handler: impl PlatformInputHandler,
|
||||||
) {
|
) {
|
||||||
if focus_handle.is_focused(self) {
|
if focus_handle.is_focused(self) {
|
||||||
self.window.current_frame.input_handler = Some(Box::new(input_handler));
|
self.window
|
||||||
|
.platform_window
|
||||||
|
.set_input_handler(Box::new(input_handler));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue