[vlc-commits] npapi win32: move holder window resizing to resize_window();
Sergey Radionov
git at videolan.org
Sat Dec 24 14:40:04 CET 2011
npapi-vlc | branch: master | Sergey Radionov <RSATom at gmail.com> | Sat Dec 24 07:27:55 2011 +0700| [5e054a87d45dfc02cf0f11f78b8db789dd46bf30] | committer: Jean-Baptiste Kempf
npapi win32: move holder window resizing to resize_window();
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=5e054a87d45dfc02cf0f11f78b8db789dd46bf30
---
npapi/vlcplugin_win.cpp | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/npapi/vlcplugin_win.cpp b/npapi/vlcplugin_win.cpp
index 8ff89cf..2b82953 100644
--- a/npapi/vlcplugin_win.cpp
+++ b/npapi/vlcplugin_win.cpp
@@ -53,16 +53,6 @@ static LRESULT CALLBACK Manage( HWND p_hwnd, UINT i_msg, WPARAM wpar, LPARAM lpa
EndPaint( p_hwnd, &paintstruct );
return 0L;
}
- case WM_SIZE:{
- int new_client_width = LOWORD(lpar);
- int new_client_height = HIWORD(lpar);
- //first child will be resized to client area
- HWND hChildWnd = GetWindow(p_hwnd, GW_CHILD);
- if(hChildWnd){
- MoveWindow(hChildWnd, 0, 0, new_client_width, new_client_height, FALSE);
- }
- return 0L;
- }
case WM_LBUTTONDBLCLK:{
p_plugin->toggle_fullscreen();
return 0L;
@@ -145,11 +135,13 @@ bool VlcPluginWin::create_windows()
bool VlcPluginWin::resize_windows()
{
- /* TODO */
HWND drawable = (HWND) (getWindow().window);
- /* Redraw window */
- InvalidateRect( drawable, NULL, TRUE );
- UpdateWindow( drawable );
+ RECT rect;
+ GetClientRect(drawable, &rect);
+ if(!_WindowsManager.IsFullScreen() && _WindowsManager.getHolderWnd()){
+ HWND hHolderWnd = _WindowsManager.getHolderWnd()->getHWND();
+ MoveWindow(hHolderWnd, 0, 0, rect.right - rect.left, rect.bottom - rect.top, TRUE);
+ }
return true;
}
More information about the vlc-commits
mailing list