]> git.sesse.net Git - vlc/commitdiff
macosx: Don't use a textured Window if we have the leopard window style.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 23 Aug 2008 17:36:28 +0000 (19:36 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 23 Aug 2008 17:39:24 +0000 (19:39 +0200)
Proposed by Georg Seifert.

modules/gui/macosx/embeddedwindow.m

index 1ecea7f39ee42940ef57f481996b1e4a0ac1c596..8b3a5c2a0ee7dd714c7c96e4db2d641b078b032c 100644 (file)
 
 @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];