Give the MouseEventHandlers for each tab bar their own id

This fixes a beachball where we oscillate back and forth between hovered and unhovered due to confusing two different tab bars as the same tab bar.
This commit is contained in:
Nathan Sobo 2021-11-03 16:15:41 -06:00
parent 595dbd44ae
commit 0ff87e603f
2 changed files with 5 additions and 1 deletions

View file

@ -2418,6 +2418,10 @@ impl<'a, T: View> RenderContext<'a, T> {
pub fn handle(&self) -> WeakViewHandle<T> {
WeakViewHandle::new(self.window_id, self.view_id)
}
pub fn view_id(&self) -> usize {
self.view_id
}
}
impl AsRef<AppContext> for &AppContext {