From 8278a0735437cae7e5c152e0503e7fd1bf83cf81 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 8 Nov 2023 21:43:14 -0700 Subject: [PATCH] Actually set the input handler --- crates/gpui2/src/window.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rs index 354c98813f..b72793b998 100644 --- a/crates/gpui2/src/window.rs +++ b/crates/gpui2/src/window.rs @@ -235,7 +235,6 @@ pub(crate) struct Frame { content_mask_stack: Vec>, element_offset_stack: Vec>, focus_stack: Vec, - input_handler: Option>, } impl Window { @@ -2177,7 +2176,9 @@ impl<'a, V: 'static> ViewContext<'a, V> { input_handler: impl PlatformInputHandler, ) { 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)); } } }