diff --git a/modules/gui/macosx/Makefile.am b/modules/gui/macosx/Makefile.am index 928f24e249710a3fe1c7f9ba68594b793631890e..55c6fe913b550531d334865b4f90c5711209ed73 100644 --- a/modules/gui/macosx/Makefile.am +++ b/modules/gui/macosx/Makefile.am @@ -8,7 +8,8 @@ libmacosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' \ -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,CoreServices \ -Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook \ -Wl,-framework,WebKit -Wl,-framework,CoreAudio -Wl,-framework,SystemConfiguration \ - -Wl,-framework,ScriptingBridge -F${CONTRIB_DIR} -Wl,-framework,BGHUDAppKit + -Wl,-framework,ScriptingBridge -F${CONTRIB_DIR} -Wl,-framework,BGHUDAppKit \ + -Wl,-framework,QuartzCore if HAVE_SPARKLE libmacosx_plugin_la_LDFLAGS += -Wl,-framework,Sparkle diff --git a/modules/gui/macosx/VideoView.m b/modules/gui/macosx/VideoView.m index 2dcf5553d7f9a5dbb2de90f057090f2ecbc1eaf6..5ac7f05a2651abe932d5653b460eeb509de47415 100644 --- a/modules/gui/macosx/VideoView.m +++ b/modules/gui/macosx/VideoView.m @@ -37,6 +37,8 @@ #import "CoreInteraction.h" #import "MainMenu.h" +#import <QuartzCore/QuartzCore.h> + #import <vlc_keys.h> @@ -79,6 +81,33 @@ return self; } +- (void)addVoutLayer:(CALayer *)aLayer +{ + if (self.layer == nil) { + [self setLayer:[CALayer layer]]; + [self setWantsLayer:YES]; + } + + [CATransaction begin]; + aLayer.opaque = 1.; + aLayer.hidden = NO; + aLayer.bounds = self.layer.bounds; + [self.layer addSublayer:aLayer]; + [self setNeedsDisplay:YES]; + [aLayer setNeedsDisplay]; + CGRect frame = aLayer.bounds; + frame.origin.x = frame.origin.y = 0.; + aLayer.frame = frame; + [CATransaction commit]; +} + +- (void)removeVoutLayer:(CALayer *)aLayer +{ + [CATransaction begin]; + [aLayer removeFromSuperlayer]; + [CATransaction commit]; +} + - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender { if ((NSDragOperationGeneric & [sender draggingSourceOperationMask]) == NSDragOperationGeneric)