Change summary
crates/gpui/src/app.rs | 6 ++++++
crates/workspace/src/pane.rs | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
Detailed changes
@@ -4917,6 +4917,12 @@ impl<T: View> From<ViewHandle<T>> for AnyViewHandle {
}
}
+impl<T> PartialEq<ViewHandle<T>> for AnyViewHandle {
+ fn eq(&self, other: &ViewHandle<T>) -> bool {
+ self.window_id == other.window_id && self.view_id == other.view_id
+ }
+}
+
impl Drop for AnyViewHandle {
fn drop(&mut self) {
self.ref_counts
@@ -1527,7 +1527,7 @@ impl View for Pane {
}
cx.focus(active_item);
- } else {
+ } else if focused != self.tab_bar_context_menu {
self.last_focused_view_by_item
.insert(active_item.id(), focused.downgrade());
}