Commit 035319dd authored by Damien Fouilleul's avatar Damien Fouilleul

- another attempt to fix fullscreen crash in mozilla plugin

parent 4da94b39
......@@ -538,6 +538,7 @@ static int aglManage( vout_thread_t * p_vout )
}
if( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE )
{
aglSetDrawable(p_vout->p_sys->agl_ctx, NULL);
Lock( p_vout );
if( p_vout->b_fullscreen )
{
......@@ -572,7 +573,7 @@ static int aglManage( vout_thread_t * p_vout )
HideWindow (p_vout->p_sys->theWindow);
SetSystemUIMode( kUIModeNormal, 0);
//CGDisplayShowCursor(kCGDirectMainDisplay);
CGDisplayShowCursor(kCGDirectMainDisplay);
//DisposeWindow( p_vout->p_sys->theWindow );
}
else
......@@ -595,13 +596,15 @@ static int aglManage( vout_thread_t * p_vout )
windowAttrs &= (~kWindowResizableAttribute);
if( !p_vout->p_sys->theWindow ) CreateNewWindow(kDocumentWindowClass, windowAttrs, &deviceRect, &p_vout->p_sys->theWindow);
if( !p_vout->p_sys->theWindow )
{
CreateNewWindow(kDocumentWindowClass, windowAttrs, &deviceRect, &p_vout->p_sys->theWindow);
if( !p_vout->p_sys->winGroup )
{
CreateWindowGroup(0, &p_vout->p_sys->winGroup);
}
SetWindowGroup(p_vout->p_sys->theWindow, p_vout->p_sys->winGroup);
SetWindowGroupParent( p_vout->p_sys->winGroup, GetWindowGroupOfClass(kDocumentWindowClass) ) ;
}
// Window title
CFStringRef titleKey = CFSTR("Fullscreen VLC media plugin");
......@@ -618,8 +621,7 @@ static int aglManage( vout_thread_t * p_vout )
{ kEventClassCommand, kEventCommandProcess }
};
InstallWindowEventHandler (p_vout->p_sys->theWindow, NewEventHandlerUPP (WindowEventHandler), GetEventTypeCount(win_events), win_events, p_vout, NULL);
ShowWindow (p_vout->p_sys->theWindow);
}
glClear( GL_COLOR_BUFFER_BIT );
p_vout->p_sys->agl_drawable = (AGLDrawable)GetWindowPort(p_vout->p_sys->theWindow);
aglSetDrawable(p_vout->p_sys->agl_ctx, p_vout->p_sys->agl_drawable);
......@@ -627,6 +629,7 @@ static int aglManage( vout_thread_t * p_vout )
aglSetViewport(p_vout, deviceRect, deviceRect);
//aglSetFullScreen(p_vout->p_sys->agl_ctx, device_width, device_height, 0, 0);
ShowWindow (p_vout->p_sys->theWindow);
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
CGDisplayHideCursor(kCGDirectMainDisplay);
}
......
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