Don't use the CoreUI private framework when sandboxed (i.e., for App Store)

This conditionally reverts 0c7e6080519014f1fb345ed25e2f12c9a043b3ae.

Change-Id: I462016cd43c489fced7fb3739aa98c521d52f78e
This commit is contained in:
Tor Lillqvist 2014-06-13 11:37:51 +03:00
parent db6f15ab21
commit b8bee05dbf

View File

@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include "vcl/salnativewidgets.hxx"
#include "vcl/decoview.hxx"
#include "vcl/svapp.hxx"
@ -36,6 +38,8 @@
#define NSAppKitVersionNumber10_7 1138
#endif
#if !HAVE_FEATURE_MACOSX_SANDBOX
extern "C"
{
typedef CFTypeRef CUIRendererRef;
@ -46,6 +50,8 @@ extern "C"
+ (CUIRendererRef)coreUIRenderer;
@end
#endif
class AquaBlinker : public Timer
{
AquaSalFrame* mpFrame;
@ -535,6 +541,13 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
case CTRL_TOOLBAR:
{
#if HAVE_FEATURE_MACOSX_SANDBOX
HIThemeMenuItemDrawInfo aMenuItemDrawInfo;
aMenuItemDrawInfo.version = 0;
aMenuItemDrawInfo.state = kThemeMenuActive;
aMenuItemDrawInfo.itemType = kThemeMenuItemHierBackground;
HIThemeDrawMenuItem(&rc,&rc,&aMenuItemDrawInfo,mrContext,kHIThemeOrientationNormal,NULL);
#else
if (rControlRegion.Top() == 0 && nPart == PART_DRAW_BACKGROUND_HORZ)
{
BOOL isMain = [mpFrame->getNSWindow() isMainWindow];
@ -559,6 +572,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
aMenuItemDrawInfo.itemType = kThemeMenuItemHierBackground;
HIThemeDrawMenuItem(&rc, &rc, &aMenuItemDrawInfo, mrContext, kHIThemeOrientationNormal, NULL);
}
#endif
bOK = true;
}
break;