diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-08-12 21:38:20 -0500 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-08-13 06:59:30 +0000 |
commit | 2c797c39478b485c0285eb351d23e0d4e0fa7585 (patch) | |
tree | ec066cc6e261daed38926cea8aa86d25d68d3b4c /vcl/osx/salnsmenu.mm | |
parent | 4498c5e1d0e0c98055d6ce6ad22c840e89b401cc (diff) |
kill YIELD_GUARD macro
Change-Id: I81990df584255f4a286cd078bcf15917c00ad504
Reviewed-on: https://gerrit.libreoffice.org/17687
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/osx/salnsmenu.mm')
-rw-r--r-- | vcl/osx/salnsmenu.mm | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/vcl/osx/salnsmenu.mm b/vcl/osx/salnsmenu.mm index d2aaed9e9e3a..23aac611dd7f 100644 --- a/vcl/osx/salnsmenu.mm +++ b/vcl/osx/salnsmenu.mm @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <vcl/window.hxx> #include "osx/salinst.h" #include "osx/saldata.hxx" @@ -24,8 +27,6 @@ #include "osx/salmenu.h" #include "osx/salnsmenu.h" -#include "vcl/window.hxx" - @implementation SalNSMenu -(id)initWithMenu: (AquaSalMenu*)pMenu { @@ -36,8 +37,8 @@ -(void)menuNeedsUpdate: (NSMenu*)pMenu { (void)pMenu; - YIELD_GUARD; - + SolarMutexGuard aGuard; + if( mpMenu ) { const AquaSalFrame* pFrame = mpMenu->getFrame(); @@ -76,8 +77,8 @@ -(void)menuItemTriggered: (id)aSender { (void)aSender; - YIELD_GUARD; - + SolarMutexGuard aGuard; + const AquaSalFrame* pFrame = mpMenuItem->mpParentMenu ? mpMenuItem->mpParentMenu->getFrame() : NULL; if( pFrame && AquaSalFrame::isAlive( pFrame ) && ! pFrame->GetWindow()->IsInModalMode() ) { @@ -93,13 +94,13 @@ if( pPopupMenu ) { // FIXME: revise this ugly code - + // select handlers in vcl are dispatch on the original menu // if not consumed by the select handler of the current menu // however since only the starting menu ever came into Execute // the hierarchy is not build up. Workaround this by getting // the menu it should have been - + // get started from hierarchy in vcl menus AquaSalMenu* pParentMenu = mpMenuItem->mpParentMenu; Menu* pCurMenu = mpMenuItem->mpVCLMenu; @@ -108,7 +109,7 @@ pCurMenu = pParentMenu->mpVCLMenu; pParentMenu = pParentMenu->mpParentSalMenu; } - + pPopupMenu->SetSelectedEntry( mpMenuItem->mnId ); pPopupMenu->ImplSelectWithStart( pCurMenu ); } @@ -168,7 +169,7 @@ } return; } - + aImgRect.origin.x += aFromRect.size.width + 2; } } |