#include <vlc_dialog.h>
#include "opengl.h"
+#ifndef MAC_OS_X_VERSION_10_7
+enum {
+ NSApplicationPresentationFullScreen = (1 << 10),
+ NSApplicationPresentationAutoHideToolbar = (1 << 11)
+};
+#endif
+
/**
* Forward declarations
*/
sys->gl.swap = OpenglSwap;
sys->gl.getProcAddress = NULL;
sys->gl.sys = sys;
+ const vlc_fourcc_t *subpicture_chromas;
+ video_format_t fmt = vd->fmt;
- sys->vgl = vout_display_opengl_New(&vd->fmt, NULL, &sys->gl);
+ sys->vgl = vout_display_opengl_New(&vd->fmt, &subpicture_chromas, &sys->gl);
if (!sys->vgl)
{
sys->gl.sys = NULL;
/* */
vout_display_info_t info = vd->info;
info.has_pictures_invalid = false;
+ info.has_event_thread = true;
+ info.subpicture_chromas = subpicture_chromas;
/* Setup vout_display_t once everything is fine */
vd->info = info;
}
case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
{
- [[sys->glView window] performSelectorOnMainThread:@selector(performZoom:) withObject: nil waitUntilDone:NO];
+ [[sys->glView window] performSelectorOnMainThread:@selector(zoom:) withObject: nil waitUntilDone:NO];
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
{
+ NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
NSPoint topleftbase;
NSPoint topleftscreen;
NSRect new_frame;
[sys->glView performSelectorOnMainThread:@selector(setWindowFrameWithValue:) withObject:[NSValue valueWithRect:new_frame] waitUntilDone:NO];
}
+ [o_pool release];
return VLC_SUCCESS;
}
*/
- (void)setWindowFrameWithValue:(NSValue *)value
{
- NSRect frame = [value rectValue];
- if (frame.origin.x <= 0.0 && frame.origin.y <= 0.0)
- [[self window] center];
- [[self window] setFrame:frame display:YES animate: YES];
+ if (!(NSAppKitVersionNumber >= 1115.2 && [NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen))
+ {
+ NSRect frame = [value rectValue];
+ if (frame.origin.x <= 0.0 && frame.origin.y <= 0.0)
+ [[self window] center];
+ [[self window] setFrame:frame display:YES animate: YES];
+ }
}
/**