diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-09-09 11:45:13 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-09-09 11:45:13 +0200 |
commit | 0cb550725d7e128e72e67739aff5338865c28abc (patch) | |
tree | 0ffabe03dd8b83e273539f26f633273d50c37397 /vcl/aqua/source/app/vclnsapp.mm | |
parent | aa611d78df11fcc1e35ead5fa093143bf17e4cf6 (diff) | |
parent | 1f0839c836781bc41f8c301b6262eabc978c90f8 (diff) |
merge commit to DEV300_m57
Diffstat (limited to 'vcl/aqua/source/app/vclnsapp.mm')
-rwxr-xr-x | vcl/aqua/source/app/vclnsapp.mm | 73 |
1 files changed, 21 insertions, 52 deletions
diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm index 4ad5e7ff9271..43d44c709c12 100755 --- a/vcl/aqua/source/app/vclnsapp.mm +++ b/vcl/aqua/source/app/vclnsapp.mm @@ -105,44 +105,33 @@ } } - /* #i89611# - Cmd-Option-Space is for some reason not consumed by the menubar, - but also not by the input method (like e.g. Cmd-Space) and stays - without function. - - However MOD1 + MOD2 combinations are not used throughout OOo code - since they tend to clash with system shortcuts on all platforms so - we can skip this case here. - */ // get information whether the event was handled; keyDown returns nothing GetSalData()->maKeyEventAnswer[ pEvent ] = false; bool bHandled = false; - if( nModMask != (NSCommandKeyMask | NSAlternateKeyMask) ) + // dispatch to view directly to avoid the key event being consumed by the menubar + // popup windows do not get the focus, so they don't get these either + // simplest would be dispatch this to the key window always if it is without parent + // however e.g. in document we want the menu shortcut if e.g. the stylist has focus + if( pFrame->mpParent && (pFrame->mnStyle & SAL_FRAME_STYLE_FLOAT) == 0 ) { - // dispatch to view directly to avoid the key event being consumed by the menubar - // popup windows do not get the focus, so they don't get these either - // simplest would be dispatch this to the key window always if it is without parent - // however e.g. in document we want the menu shortcut if e.g. the stylist has focus - if( pFrame->mpParent && (pFrame->mnStyle & SAL_FRAME_STYLE_FLOAT) == 0 ) - { - [[pKeyWin contentView] keyDown: pEvent]; - bHandled = GetSalData()->maKeyEventAnswer[ pEvent ]; - } - - // see whether the main menu consumes this event - // if not, we want to dispatch it ourselves. Unless we do this "trick" - // the main menu just beeps for an unknown or disabled key equivalent - // and swallows the event wholesale - NSMenu* pMainMenu = [NSApp mainMenu]; - if( ! bHandled && (pMainMenu == 0 || ! [pMainMenu performKeyEquivalent: pEvent]) ) - { - [[pKeyWin contentView] keyDown: pEvent]; - bHandled = GetSalData()->maKeyEventAnswer[ pEvent ]; - } - else - bHandled = true; // event handled already or main menu just handled it + [[pKeyWin contentView] keyDown: pEvent]; + bHandled = GetSalData()->maKeyEventAnswer[ pEvent ]; + } + + // see whether the main menu consumes this event + // if not, we want to dispatch it ourselves. Unless we do this "trick" + // the main menu just beeps for an unknown or disabled key equivalent + // and swallows the event wholesale + NSMenu* pMainMenu = [NSApp mainMenu]; + if( ! bHandled && (pMainMenu == 0 || ! [pMainMenu performKeyEquivalent: pEvent]) ) + { + [[pKeyWin contentView] keyDown: pEvent]; + bHandled = GetSalData()->maKeyEventAnswer[ pEvent ]; } + else + bHandled = true; // event handled already or main menu just handled it + GetSalData()->maKeyEventAnswer.erase( pEvent ); if( bHandled ) return; @@ -374,26 +363,6 @@ AquaSalMenu::removeFallbackMenuItem( pItem ); } -- (void)getSystemVersionMajor:(unsigned *)major - minor:(unsigned *)minor - bugFix:(unsigned *)bugFix -{ - OSErr err; - SInt32 systemVersion = VER_TIGER; // Initialize with minimal requirement - if ((err = Gestalt(gestaltSystemVersion, &systemVersion)) == noErr) - { - GetSalData()->mnSystemVersion = systemVersion; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "System Version %x\n", (unsigned int)systemVersion); - fprintf( stderr, "Stored System Version %x\n", (unsigned int)GetSalData()->mnSystemVersion); -#endif - } - else - NSLog(@"Unable to obtain system version: %ld", (long)err); - - return; -} - -(void)addDockMenuItem: (NSMenuItem*)pNewItem { NSMenu* pDock = AquaSalInstance::GetDynamicDockMenu(); |