mac: Handle the case when closing all menu runners
This commit is contained in:
parent
088042841d
commit
7a8864063b
1 changed files with 6 additions and 1 deletions
|
@ -108,7 +108,12 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuMac::ClosePopupAt(int32_t window_id) {
|
void MenuMac::ClosePopupAt(int32_t window_id) {
|
||||||
popup_controllers_.erase(window_id);
|
auto it = popup_controllers_.find(window_id);
|
||||||
|
if (it != popup_controllers_.end()) {
|
||||||
|
popup_controllers_.erase(it);
|
||||||
|
} else if (window_id == -1) {
|
||||||
|
popup_controllers_.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue