Change summary
crates/gpui2/src/action.rs | 2 ++
crates/gpui2/src/elements/div.rs | 1 +
crates/terminal_view2/src/terminal_panel.rs | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
Detailed changes
@@ -183,6 +183,8 @@ macro_rules! impl_actions {
Ok(std::boxed::Box::new(gpui::serde_json::from_value::<Self>(value)?))
}
);
+
+ gpui::register_action!($name);
)*
};
}
@@ -964,6 +964,7 @@ impl Interactivity {
let interactive_bounds = interactive_bounds.clone();
cx.on_mouse_event(move |event: &MouseDownEvent, phase, cx| {
if phase == DispatchPhase::Bubble
+ && event.button == MouseButton::Left
&& interactive_bounds.visibly_contains(&event.position, cx)
{
*pending_mouse_down.borrow_mut() = Some(event.clone());
@@ -24,7 +24,7 @@ use anyhow::Result;
const TERMINAL_PANEL_KEY: &'static str = "TerminalPanel";
-actions!(terminal_view, [ToggleFocus]);
+actions!(terminal_panel, [ToggleFocus]);
pub fn init(cx: &mut AppContext) {
cx.observe_new_views(