Commit 7ac0b4fd authored by Felix Paul Kühne's avatar Felix Paul Kühne

windowed mac plugin: fix controller resizing in fullscreen mode

parent 4f514c98
......@@ -461,9 +461,10 @@ bool VlcPluginMac::handle_event(void *event)
CGContextSaveGState(cgContext);
/* Compute the position of the video */
CGSize layerSize = [self preferredFrameSize];
float left = (layerSize.width - media_width) / 2.;
float top = (layerSize.height - media_height) / 2.;
NSRect layerRect = self.bounds;
float left = (layerRect.size.width - media_width) / 2.;
float top = (layerRect.size.height - media_height) / 2.;
static const size_t kComponentsPerPixel = 4;
static const size_t kBitsPerComponent = sizeof(unsigned char) * 8;
......@@ -835,7 +836,7 @@ static CGImageRef createImageNamed(NSString *name)
[self center];
_customContentView = [[VLCFullscreenContentView alloc] initWithFrame:_initialFrame];
[[self contentView] setAutoresizesSubviews:YES];
[_customContentView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
[[self contentView] addSubview: _customContentView];
[self setInitialFirstResponder:_customContentView];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment