diff options
Diffstat (limited to 'vcl/source/window/syswin.cxx')
-rw-r--r-- | vcl/source/window/syswin.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index c08a60168a93..2ec48b30bc85 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -126,7 +126,8 @@ void SystemWindow::dispose() bool SystemWindow::Notify( NotifyEvent& rNEvt ) { // capture KeyEvents for menu handling - if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT || + rNEvt.GetType() == MouseNotifyEvent::COMMAND) { MenuBar* pMBar = mpMenuBar; if ( !pMBar && ( GetType() == WINDOW_FLOATINGWINDOW ) ) @@ -135,7 +136,15 @@ bool SystemWindow::Notify( NotifyEvent& rNEvt ) if( pWin && pWin->IsSystemWindow() ) pMBar = static_cast<SystemWindow*>(pWin)->GetMenuBar(); } - if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), false ) ) + bool bDone(false); + if (pMBar) + { + if (rNEvt.GetType() == MouseNotifyEvent::COMMAND) + bDone = pMBar->ImplHandleCmdEvent(*rNEvt.GetCommandEvent()); + else + bDone = pMBar->ImplHandleKeyEvent(*rNEvt.GetKeyEvent(), false); + } + if (bDone) return true; } |