Mac: disable application menu items during modal session
The default menu items in the application menu are not part of a traversable menu object hierarchy, so we never find a menubar. Since that is only the case for those items, we can disable them during any modal session. Change-Id: Ie8d8db274176237de664c6e5ebfe5015e13800e4 Fixes: QTBUG-80273 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
cb3152086c
commit
5b9f6862b1
@ -84,7 +84,8 @@ static bool selectorIsCutCopyPaste(SEL selector)
|
||||
menuParent = menuObject->menuParent();
|
||||
}
|
||||
|
||||
if (menubar && menubar->cocoaWindow() != self.platformWindow)
|
||||
// we have no menubar parent for the application menu items, e.g About and Preferences
|
||||
if (!menubar || menubar->cocoaWindow() != self.platformWindow)
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user