[vlc-devel] commit: macosx: Don' t use a textured Window if we have the leopard window style. (Pierre d' Herbemont )

git version control git at videolan.org
Sat Aug 23 19:36:19 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Aug 23 19:36:28 2008 +0200| [5c0c38f4973b0a8100348b541dd81fd146444d2a] | committer: Pierre d'Herbemont 

macosx: Don't use a textured Window if we have the leopard window style.

Proposed by Georg Seifert.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c0c38f4973b0a8100348b541dd81fd146444d2a
---

 modules/gui/macosx/embeddedwindow.m |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m
index 1ecea7f..8b3a5c2 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];




More information about the vlc-devel mailing list