[vlc-commits] ActiveX: Fullscreen window now created only when needed.
Sergey Radionov
git at videolan.org
Tue Nov 8 02:18:54 CET 2011
npapi-vlc | branch: master | Sergey Radionov <RSATom at gmail.com> | Fri Jul 29 19:41:42 2011 +0700| [f15fb30a399d8e94f1c27583143528b180388ac8] | committer: Jean-Baptiste Kempf
ActiveX: Fullscreen window now created only when needed.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=f15fb30a399d8e94f1c27583143528b180388ac8
---
activex/vlc_win32_fullscreen.cpp | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/activex/vlc_win32_fullscreen.cpp b/activex/vlc_win32_fullscreen.cpp
index fa51bea..3fc06f5 100644
--- a/activex/vlc_win32_fullscreen.cpp
+++ b/activex/vlc_win32_fullscreen.cpp
@@ -831,10 +831,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;
}
@@ -852,6 +856,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/**/);
@@ -872,7 +880,12 @@ void VLCWindowsManager::EndFullScreen()
ShowWindow(_hWindowedParentWnd, SW_SHOW);
ShowWindow(_FSWnd->getHWND(), SW_HIDE);
- }
+
+ if(_FSWnd){
+ _FSWnd->DestroyWindow();
+ }
+ _FSWnd = 0;
+ }
}
void VLCWindowsManager::ToggleFullScreen()
More information about the vlc-commits
mailing list