Introduce a WindowContext::focus method that implies the window id
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user