[vlc-commits] macosx: don't draw the time slider's 'fancy gradient effect' on Leopard, since this leads to ugly artifacts due to the outdated CoreAnimation version

Felix Paul Kühne git at videolan.org
Fri Jan 6 19:49:45 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Jan  6 19:49:41 2012 +0100| [cd4bf104f3db9527581865f44312dbdd696eab39] | committer: Felix Paul Kühne

macosx: don't draw the time slider's 'fancy gradient effect' on Leopard, since this leads to ugly artifacts due to the outdated CoreAnimation version

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

 modules/gui/macosx/CompatibilityFixes.h |    2 +-
 modules/gui/macosx/MainWindow.m         |   12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/CompatibilityFixes.h b/modules/gui/macosx/CompatibilityFixes.h
index 3ff6bb8..3732546 100644
--- a/modules/gui/macosx/CompatibilityFixes.h
+++ b/modules/gui/macosx/CompatibilityFixes.h
@@ -82,7 +82,7 @@ enum {
     NSApplicationPresentationAutoHideToolbar            = (1 << 11)
 };
 
-/* the follow is just to fix warnings, not for implementation! */
+/* the following is just to fix warnings, not for implementation! */
 @interface NSWindow (IntroducedInLion)
 - (void)setRestorable:(BOOL)b_value;
 - (void)toggleFullScreen:(id)id_value;
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 96a7416..109bef8 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -422,6 +422,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
     if ([self styleMask] & NSResizableWindowMask)
         [o_resize_view removeFromSuperviewWithoutNeedingDisplay];
+
+    if (OSX_LEOPARD)
+        [o_time_sld_fancygradient_view removeFromSuperviewWithoutNeedingDisplay];
 }
 
 #pragma mark -
@@ -683,6 +686,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
     return YES;
 }
 
+- (BOOL)isMainWindow
+{
+	return YES;
+}
+
 - (void)setTitle:(NSString *)title
 {
     if (b_dark_interface)
@@ -1019,6 +1027,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)drawFancyGradientEffectForTimeSlider
 {
+    if (OSX_LEOPARD)
+        return;
+
     NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
     CGFloat f_value = [o_time_sld knobPosition];
     if (f_value > 7.5)
@@ -1150,6 +1161,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     if (b_fullscreen) {
         [self recreateHideMouseTimer];
     }
+    [super mouseMoved: theEvent];
 }
 
 - (void)recreateHideMouseTimer



More information about the vlc-commits mailing list