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

NPAPI: Win32, Added checking of correct using of fullscreen support.

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent d7164794
......@@ -845,17 +845,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);
......@@ -872,6 +882,9 @@ void VLCWindowsManager::StartFullScreen()
void VLCWindowsManager::EndFullScreen()
{
if(!_HolderWnd)
return;//VLCWindowsManager::CreateWindows was not called
if(IsFullScreen()){
SetParent(_HolderWnd->getHWND(), _hWindowedParentWnd);
......@@ -901,7 +914,7 @@ void VLCWindowsManager::ToggleFullScreen()
bool VLCWindowsManager::IsFullScreen()
{
return 0!=_FSWnd && GetParent(_HolderWnd->getHWND())==_FSWnd->getHWND();
return 0!=_FSWnd && 0!=_HolderWnd && GetParent(_HolderWnd->getHWND())==_FSWnd->getHWND();
}
#endif //_WIN32
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