Commit 32fb017d authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

winemac.drv: Remove workarounds for Mac OS X 10.6 and earlier.

parent deff68bb
......@@ -299,15 +299,12 @@ static NSString* WineLocalizedString(unsigned int stringID)
[submenu addItemWithTitle:WineLocalizedString(STRING_MENU_ITEM_ZOOM)
action:@selector(performZoom:)
keyEquivalent:@""];
if ([NSWindow instancesRespondToSelector:@selector(toggleFullScreen:)])
{
item = [submenu addItemWithTitle:WineLocalizedString(STRING_MENU_ITEM_ENTER_FULL_SCREEN)
action:@selector(toggleFullScreen:)
keyEquivalent:@"f"];
[item setKeyEquivalentModifierMask:NSEventModifierFlagCommand |
NSEventModifierFlagOption |
NSEventModifierFlagControl];
}
[submenu addItem:[NSMenuItem separatorItem]];
[submenu addItemWithTitle:WineLocalizedString(STRING_MENU_ITEM_BRING_ALL_TO_FRONT)
action:@selector(arrangeInFront:)
......
......@@ -36,20 +36,6 @@
#import "cocoa_opengl.h"
#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
enum {
NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7,
NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8,
NSWindowFullScreenButton = 7,
NSWindowStyleMaskFullScreen = 1 << 14,
};
@interface NSWindow (WineFullScreenExtensions)
- (void) toggleFullScreen:(id)sender;
@end
#endif
#if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
/* Additional Mac virtual keycode, to complement those in Carbon's <HIToolbox/Events.h>. */
enum {
......@@ -1091,11 +1077,8 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
[[self standardWindowButton:NSWindowMiniaturizeButton] setEnabled:!self.disabled];
if (style & NSWindowStyleMaskResizable)
[[self standardWindowButton:NSWindowZoomButton] setEnabled:!self.disabled];
if ([self respondsToSelector:@selector(toggleFullScreen:)])
{
if ([self collectionBehavior] & NSWindowCollectionBehaviorFullScreenPrimary)
[[self standardWindowButton:NSWindowFullScreenButton] setEnabled:!self.disabled];
}
if ([self preventResizing])
{
......@@ -1115,8 +1098,6 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
- (void) adjustFullScreenBehavior:(NSWindowCollectionBehavior)behavior
{
if ([self respondsToSelector:@selector(toggleFullScreen:)])
{
NSUInteger style = [self styleMask];
if (behavior & NSWindowCollectionBehaviorParticipatesInCycle &&
......@@ -1133,7 +1114,6 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
if (style & NSWindowStyleMaskFullScreen)
[super toggleFullScreen:nil];
}
}
if (behavior != [self collectionBehavior])
{
......@@ -2480,12 +2460,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
for (i = 0; i < sizeof(buttons) / sizeof(buttons[0]); i++)
{
NSButton* button;
if (buttons[i] == NSWindowFullScreenButton && ![self respondsToSelector:@selector(toggleFullScreen:)])
continue;
button = [self standardWindowButton:buttons[i]];
NSButton* button = [self standardWindowButton:buttons[i]];
if ([button hitTest:[button.superview convertPoint:event.locationInWindow fromView:nil]])
{
hitButton = YES;
......
......@@ -1248,7 +1248,6 @@ static BOOL init_gl_info(void)
kCGLPFADisplayMask, displayMask,
0
};
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
CGLPixelFormatAttribute core_attribs[] =
{
kCGLPFADisplayMask, displayMask,
......@@ -1256,7 +1255,6 @@ static BOOL init_gl_info(void)
kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute)kCGLOGLPVersion_3_2_Core,
0
};
#endif
CGLPixelFormatObj pix;
GLint virtualScreens;
CGLError err;
......@@ -1308,7 +1306,6 @@ static BOOL init_gl_info(void)
CGLSetCurrentContext(old_context);
CGLReleaseContext(context);
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
err = CGLChoosePixelFormat(core_attribs, &pix, &virtualScreens);
if (err != kCGLNoError || !pix)
{
......@@ -1340,7 +1337,6 @@ static BOOL init_gl_info(void)
sscanf(str, "%u.%u", &gl_info.max_major, &gl_info.max_minor);
CGLSetCurrentContext(old_context);
CGLReleaseContext(context);
#endif
return TRUE;
}
......@@ -1397,14 +1393,6 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
CGLError err;
BOOL core = major >= 3;
#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
if (core)
{
WARN("OS X version >= 10.7 is required to be able to create core contexts\n");
return FALSE;
}
#endif
pf = get_pixel_format(context->format, TRUE /* non-displayable */);
if (!pf)
{
......@@ -1480,7 +1468,6 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
if (pf->backing_store)
attribs[n++] = kCGLPFABackingStore;
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (core)
{
attribs[n++] = kCGLPFAOpenGLProfile;
......@@ -1493,7 +1480,6 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
attribs[n++] = (int)kCGLOGLPVersion_3_2_Core;
#endif
}
#endif
attribs[n] = 0;
......@@ -1856,12 +1842,8 @@ static CGLPixelFormatObj create_pixel_format_for_renderer(CGLRendererInfoObj ren
if (core)
{
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
attrs[3] = kCGLPFAOpenGLProfile;
attrs[4] = (CGLPixelFormatAttribute)kCGLOGLPVersion_3_2_Core;
#else
return NULL;
#endif
}
if (!get_renderer_property(renderer_info, renderer, kCGLRPRendererID, &renderer_id))
......@@ -2157,12 +2139,10 @@ static BOOL query_renderer_integer(CGLRendererInfoObj renderer_info, GLint rende
}
case WGL_RENDERER_VIDEO_MEMORY_WINE:
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
err = CGLDescribeRenderer(renderer_info, renderer, kCGLRPVideoMemoryMegabytes, (GLint*)value);
if (err != kCGLNoError && err != kCGLBadProperty)
WARN("CGLDescribeRenderer(kCGLRPVideoMemoryMegabytes) failed: %d %s\n", err, CGLErrorString(err));
if (err != kCGLNoError)
#endif
{
if (get_renderer_property(renderer_info, renderer, kCGLRPVideoMemory, (GLint*)value))
*value /= 1024 * 1024;
......
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