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

NPAPI: Win32, Fullscreen window now created only when needed.

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent c456a749
......@@ -832,10 +832,14 @@ void VLCWindowsManager::CreateWindows(HWND hWindowedParentWnd)
void VLCWindowsManager::DestroyWindows()
{
_FSWnd->DestroyWindow();
if(_FSWnd){
_FSWnd->DestroyWindow();
}
_FSWnd = 0;
_HolderWnd->DestroyWindow();
if(_HolderWnd){
_HolderWnd->DestroyWindow();
}
_HolderWnd = 0;
}
......@@ -853,6 +857,10 @@ void VLCWindowsManager::LibVlcDetach()
void VLCWindowsManager::StartFullScreen()
{
if(getMD()&&!IsFullScreen()){
if(!_FSWnd){
_FSWnd= VLCFullScreenWnd::CreateFSWindow(this);
}
SetParent(_HolderWnd->getHWND(), _FSWnd->getHWND());
SetWindowPos(_FSWnd->getHWND(), HWND_TOPMOST, 0, 0,
GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), 0/** /SWP_NOZORDER/**/);
......@@ -873,7 +881,12 @@ void VLCWindowsManager::EndFullScreen()
ShowWindow(_hWindowedParentWnd, SW_SHOW);
ShowWindow(_FSWnd->getHWND(), SW_HIDE);
}
if(_FSWnd){
_FSWnd->DestroyWindow();
}
_FSWnd = 0;
}
}
void VLCWindowsManager::ToggleFullScreen()
......
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