Merge pull request #2265 from zed-industries/fix-menu-bar-greying-out

Fix too-agressive menu bar greying
This commit is contained in:
Mikayla Maki 2023-03-10 16:05:07 -08:00 committed by GitHub
commit 87ac409e51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 14 deletions

View file

@ -1323,7 +1323,7 @@ impl MutableAppContext {
pub fn is_action_available(&self, action: &dyn Action) -> bool {
let action_type = action.as_any().type_id();
if let Some(window_id) = self.cx.platform.key_window_id() {
if let Some(window_id) = self.cx.platform.main_window_id() {
if let Some(focused_view_id) = self.focused_view_id(window_id) {
for view_id in self.ancestors(window_id, focused_view_id) {
if let Some(view) = self.views.get(&(window_id, view_id)) {