Introduce a WindowContext::focus
method that implies the window id
This commit is contained in:
parent
31483db5d8
commit
25564ea058
3 changed files with 8 additions and 8 deletions
|
@ -244,8 +244,7 @@ impl ContextMenu {
|
|||
let show_count = self.show_count;
|
||||
cx.defer(move |this, cx| {
|
||||
if cx.handle().is_focused(cx) && this.show_count == show_count {
|
||||
let window_id = cx.window_id();
|
||||
(**cx).focus(window_id, this.previously_focused_view_id.take());
|
||||
(**cx).focus(this.previously_focused_view_id.take());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue