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

This conditionally reverts 0c7e608051.

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