[vlc-devel] commit: macosx: Attempt to really fix window look. (Pierre d'Herbemont )

git version control git at videolan.org
Tue Aug 26 00:52:24 CEST 2008


vlc | branch: 0.9-bugfix | Pierre d'Herbemont <pdherbemont at videolan.org> | Tue Aug 26 00:55:23 2008 +0200| [111f8992fa1cf9da7ff18bfaf7287b89661cb396] | committer: Pierre d'Herbemont 

macosx: Attempt to really fix window look.

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

 modules/gui/macosx/embeddedwindow.m |   29 +++++++++--------------------
 1 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m
index 318f684..e5f09b5 100644
--- a/modules/gui/macosx/embeddedwindow.m
+++ b/modules/gui/macosx/embeddedwindow.m
@@ -44,26 +44,15 @@
 - (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
 {
     if(MACOS_VERSION < 10.5f)
-    {
-        self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
-    } else {
-        SEL theSelector;
-        NSMethodSignature *aSignature;
-        NSInvocation *anInvocation;
-        float f_value = 32.0f;
-        NSRectEdge ouredge = NSMinYEdge;
-
-        windowStyle ^= NSTexturedBackgroundWindowMask;
-        self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
-
-        theSelector = @selector(setContentBorderThickness:forEdge:);
-        aSignature = [VLCEmbeddedWindow instanceMethodSignatureForSelector:theSelector];
-        anInvocation = [NSInvocation invocationWithMethodSignature:aSignature];
-        [anInvocation setSelector:theSelector];
-        [anInvocation setTarget:self];
-        [anInvocation setArgument:&f_value atIndex:2]; /* FIXME it's actually CGFLoat */
-        [anInvocation setArgument:&ouredge atIndex:3];
-    }
+        return [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
+
+#ifdef __ppc__
+    return [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
+#endif
+
+    windowStyle ^= NSTexturedBackgroundWindowMask;
+    self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
+    [self setContentBorderThickness:32.0 forEdge:NSMinYEdge];
     return self;
 }
 




More information about the vlc-devel mailing list