[vlc-devel] [PATCH 5/7] npapi win32: move holder window resizing to resize_window();
Sergey Radionov
rsatom at gmail.com
Sat Dec 24 02:17:12 CET 2011
---
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;
}
--
1.7.7.1.msysgit.0
More information about the vlc-devel
mailing list