When opening a path in an existing window, move it to the foreground
This commit is contained in:
parent
7c233ed682
commit
fbca28337a
5 changed files with 20 additions and 4 deletions
|
@ -851,6 +851,12 @@ impl MutableAppContext {
|
|||
self.cx.windows.keys().cloned()
|
||||
}
|
||||
|
||||
pub fn activate_window(&self, window_id: usize) {
|
||||
if let Some((_, window)) = self.presenters_and_platform_windows.get(&window_id) {
|
||||
window.activate()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn root_view<T: View>(&self, window_id: usize) -> Option<ViewHandle<T>> {
|
||||
self.cx
|
||||
.windows
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue