[vlc-commits] npapi win32: call destroy_windows on drawable destroying ( opera compatibility fix)

Sergey Radionov git at videolan.org
Sat Dec 31 03:50:20 CET 2011


npapi-vlc | branch: master | Sergey Radionov <RSATom at gmail.com> | Fri Dec 30 19:02:15 2011 +0700| [f568362694ea4f046c6020d613c38da15f25097c] | committer: Jean-Baptiste Kempf

npapi win32: call destroy_windows on drawable destroying (opera compatibility fix)

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=f568362694ea4f046c6020d613c38da15f25097c
---

 npapi/vlcplugin_win.cpp |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/npapi/vlcplugin_win.cpp b/npapi/vlcplugin_win.cpp
index 05b0a9c..f8331eb 100644
--- a/npapi/vlcplugin_win.cpp
+++ b/npapi/vlcplugin_win.cpp
@@ -56,6 +56,13 @@ LRESULT CALLBACK VlcPluginWin::NPWndProcR(HWND hWnd, UINT uMsg, WPARAM wParam, L
     if( ud ) {
         VlcPluginWin *p_plugin = reinterpret_cast<VlcPluginWin *>(ud);
 
+        switch( uMsg ){
+            case WM_DESTROY:
+                // Opera does not call NPP_SetWindow on window destruction...
+                p_plugin->destroy_windows();
+                break;
+        }
+
         /* delegate to default handler */
         return CallWindowProc( p_plugin->_NPWndProc, hWnd,
                                uMsg, wParam, lParam);



More information about the vlc-commits mailing list