slideshow: convert new to ::Create to get initial ref-counting right.
Change-Id: I513dacfa0dd2e902437578611b6d39575f2e7314
This commit is contained in:
@@ -471,20 +471,20 @@ namespace slideshow
|
|||||||
#else
|
#else
|
||||||
if( avmedia::IsModel(rMimeType) )
|
if( avmedia::IsModel(rMimeType) )
|
||||||
{
|
{
|
||||||
mpEventHandlerParent.reset(new vcl::Window(pWindow, WB_NOBORDER|WB_NODIALOGCONTROL));
|
mpEventHandlerParent.reset(VclPtr<vcl::Window>::Create(pWindow, WB_NOBORDER|WB_NODIALOGCONTROL));
|
||||||
mpEventHandlerParent->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ),
|
mpEventHandlerParent->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ),
|
||||||
Size( aAWTRect.Width, aAWTRect.Height ) );
|
Size( aAWTRect.Width, aAWTRect.Height ) );
|
||||||
mpEventHandlerParent->EnablePaint(false);
|
mpEventHandlerParent->EnablePaint(false);
|
||||||
mpEventHandlerParent->Show();
|
mpEventHandlerParent->Show();
|
||||||
SystemWindowData aWinData = OpenGLContext::generateWinData(mpEventHandlerParent.get(), false);
|
SystemWindowData aWinData = OpenGLContext::generateWinData(mpEventHandlerParent.get(), false);
|
||||||
mpMediaWindow.reset(new SystemChildWindow(mpEventHandlerParent.get(), 0, &aWinData));
|
mpMediaWindow.reset(VclPtr<SystemChildWindow>::Create(mpEventHandlerParent.get(), 0, &aWinData));
|
||||||
mpMediaWindow->SetPosSizePixel( Point( 0, 0 ),
|
mpMediaWindow->SetPosSizePixel( Point( 0, 0 ),
|
||||||
Size( aAWTRect.Width, aAWTRect.Height ) );
|
Size( aAWTRect.Width, aAWTRect.Height ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
mpMediaWindow.reset( new SystemChildWindow( pWindow, WB_CLIPCHILDREN ) );
|
mpMediaWindow.reset( VclPtr<SystemChildWindow>::Create( pWindow, WB_CLIPCHILDREN ) );
|
||||||
mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ),
|
mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ),
|
||||||
Size( aAWTRect.Width, aAWTRect.Height ) );
|
Size( aAWTRect.Width, aAWTRect.Height ) );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user