From 5c0c38f4973b0a8100348b541dd81fd146444d2a Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Sat, 23 Aug 2008 19:36:28 +0200 Subject: [PATCH] macosx: Don't use a textured Window if we have the leopard window style. Proposed by Georg Seifert. --- modules/gui/macosx/embeddedwindow.m | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m index 1ecea7f39e..8b3a5c2a0e 100644 --- a/modules/gui/macosx/embeddedwindow.m +++ b/modules/gui/macosx/embeddedwindow.m @@ -41,6 +41,22 @@ @implementation VLCEmbeddedWindow +- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation +{ + BOOL useTextured = YES; + if([[NSWindow class] instancesRespondToSelector:@selector(setContentBorderThickness:forEdge:)]) + { + useTextured = NO; + windowStyle ^= NSTexturedBackgroundWindowMask; + } + self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation]; + if(!useTextured) + { + [self setContentBorderThickness:32.0 forEdge:NSMinYEdge]; + } + return self; +} + - (void)awakeFromNib { [self setDelegate: self]; -- 2.39.2