Commit ebd94835 authored by Sergey Radionov's avatar Sergey Radionov Committed by Rémi Denis-Courmont

ActiveX: Added checking of correct using of fullscreen support.

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 55fe4f34
......@@ -844,17 +844,27 @@ void VLCWindowsManager::DestroyWindows()
void VLCWindowsManager::LibVlcAttach(libvlc_media_player_t* p_md)
{
if(!_HolderWnd)
return;//VLCWindowsManager::CreateWindows was not called
_p_md=p_md;
libvlc_media_player_set_hwnd(p_md, _HolderWnd->getHWND());
}
void VLCWindowsManager::LibVlcDetach()
{
if(_p_md){
libvlc_media_player_set_hwnd(_p_md, 0);
}
_p_md=0;
}
void VLCWindowsManager::StartFullScreen()
{
if(!_HolderWnd)
return;//VLCWindowsManager::CreateWindows was not called
if(getMD()&&!IsFullScreen()){
if(!_FSWnd){
_FSWnd= VLCFullScreenWnd::CreateFSWindow(this);
......@@ -871,6 +881,9 @@ void VLCWindowsManager::StartFullScreen()
void VLCWindowsManager::EndFullScreen()
{
if(!_HolderWnd)
return;//VLCWindowsManager::CreateWindows was not called
if(IsFullScreen()){
SetParent(_HolderWnd->getHWND(), _hWindowedParentWnd);
......@@ -900,5 +913,5 @@ void VLCWindowsManager::ToggleFullScreen()
bool VLCWindowsManager::IsFullScreen()
{
return 0!=_FSWnd && GetParent(_HolderWnd->getHWND())==_FSWnd->getHWND();
return 0!=_FSWnd && 0!=_HolderWnd && GetParent(_HolderWnd->getHWND())==_FSWnd->getHWND();
}
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