From 43a7eb6ca5913a90baedf68b9939b7f7e1ae46df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 21 Feb 2010 20:13:16 +0000 Subject: [PATCH] Add comment explaining why MenusBeginning() is invoked before handling key events with the command key pressed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35567 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 1168621d17..fc33a4a0a7 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -3641,6 +3641,10 @@ BWindow::_HandleKeyDown(BMessage* event) return true; } + // Pretend that the user opened a menu, to give the subclass a + // chance to update it's menus. This may install new shortcuts, + // which is why we have to call it here, before trying to find + // a shortcut for the given key. MenusBeginning(); Shortcut* shortcut = _FindShortcut(key, modifiers);