summaryrefslogtreecommitdiff
path: root/src/ui/bindingswidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/bindingswidget.c')
-rw-r--r--src/ui/bindingswidget.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/bindingswidget.c b/src/ui/bindingswidget.c
index 23fbbe88..a6e9f6a0 100644
--- a/src/ui/bindingswidget.c
+++ b/src/ui/bindingswidget.c
@@ -26,6 +26,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
26#include "command.h" 26#include "command.h"
27#include "util.h" 27#include "util.h"
28#include "app.h" 28#include "app.h"
29#if defined (iPlatformApple)
30# include "macos.h"
31#endif
29 32
30iDeclareType(BindingItem) 33iDeclareType(BindingItem)
31typedef iListItemClass iBindingItemClass; 34typedef iListItemClass iBindingItemClass;
@@ -129,6 +132,13 @@ static void setActiveItem_BindingsWidget_(iBindingsWidget *d, size_t pos) {
129 item->isWaitingForEvent = iTrue; 132 item->isWaitingForEvent = iTrue;
130 invalidateItem_ListWidget(d->list, d->activePos); 133 invalidateItem_ListWidget(d->list, d->activePos);
131 } 134 }
135#if defined (iPlatformApple)
136 /* Native menus must be disabled while grabbing keys so the shortcuts don't trigger. */
137 const iBool enableNativeMenus = (d->activePos == iInvalidPos);
138 enableMenu_MacOS("Edit", enableNativeMenus);
139 enableMenu_MacOS("View", enableNativeMenus);
140 enableMenu_MacOS("Identity", enableNativeMenus);
141#endif
132} 142}
133 143
134static iBool processEvent_BindingsWidget_(iBindingsWidget *d, const SDL_Event *ev) { 144static iBool processEvent_BindingsWidget_(iBindingsWidget *d, const SDL_Event *ev) {