Commit 7dbb9fee authored by Oleksii Samorukov's avatar Oleksii Samorukov

Fix compilation on Mac 10.6 and 10.7 (#2112)

parent 62eabad7
......@@ -94,6 +94,10 @@
/* Whether the window's maximized or not */
#define GIMP_IMAGE_WINDOW_MAXIMIZED "maximized"
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
#define NSWindowCollectionBehaviorFullScreenAuxiliary (1 << 8)
#endif
enum
{
......@@ -633,12 +637,7 @@ gimp_image_window_map (GtkWidget *widget)
* as soon as GTK+ has proper support for this, we will migrate to the
* new-style full screen mode.
*/
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
ns_window.collectionBehavior |= NSWindowCollectionBehaviorFullScreenAuxiliary;
#else
/* Hard code the define ... */
ns_window.collectionBehavior |= 1 << 8;
#endif
#endif /* !GDK_WINDOWING_QUARTZ */
}
......
......@@ -34,7 +34,7 @@
#endif
#ifdef PLATFORM_OSX
#include <CoreGraphics/CoreGraphics.h>
#include <ApplicationServices/ApplicationServices.h>
#endif
#include "libgimpbase/gimpbase.h"
......
......@@ -34,6 +34,21 @@
#include <ApplicationServices/ApplicationServices.h>
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
@interface NSWindow (GIMPExt)
- (NSRect) convertRectToScreen: (NSRect)aRect;
@end
@implementation NSWindow (GIMPExt)
- (NSRect) convertRectToScreen: (NSRect)aRect
{
NSRect result = aRect;
NSPoint origin = result.origin;
result.origin = [self convertBaseToScreen:origin];
return result;
}
@end
#endif
@interface GimpPickWindowController : NSObject
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment