[vlc-commits] activex: Lotus Notes support

Sergey Radionov git at videolan.org
Wed Jul 4 11:12:21 CEST 2012


npapi-vlc | branch: master | Sergey Radionov <rsatom at gmail.com> | Fri Jun 29 21:22:35 2012 +0700| [34616730420e1fd8348febef6c48eae128831f3a] | committer: Rafaël Carré

activex: Lotus Notes support

Signed-off-by: Rafaël Carré <funman at videolan.org>

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

 activex/oleobject.cpp |    4 ++--
 activex/plugin.cpp    |   15 ++++++++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/activex/oleobject.cpp b/activex/oleobject.cpp
index d0c3806..ca258db 100644
--- a/activex/oleobject.cpp
+++ b/activex/oleobject.cpp
@@ -156,8 +156,8 @@ HRESULT VLCOleObject::doInPlaceActivate(LPMSG lpMsg, LPOLECLIENTSITE pActiveSite
         // check if not already activated
         if( ! _p_instance->isInPlaceActive() )
         {
-            if( ((NULL == p_inPlaceSite) || (S_OK == p_inPlaceSite->CanInPlaceActivate()))
-             && SUCCEEDED(_p_instance->onActivateInPlace(lpMsg, hwndParent, lprcPosRect, lprcClipRect)) )
+            if( p_inPlaceSite &&
+                SUCCEEDED(_p_instance->onActivateInPlace(lpMsg, hwndParent, lprcPosRect, lprcClipRect)) )
             {
                 if( p_inPlaceSiteEx )
                 {
diff --git a/activex/plugin.cpp b/activex/plugin.cpp
index 17ac732..8a0e1cc 100644
--- a/activex/plugin.cpp
+++ b/activex/plugin.cpp
@@ -399,7 +399,6 @@ HRESULT VLCPlugin::onInit(void)
         // initialize persistable properties
         set_autoplay(true);
         _b_autoloop   = FALSE;
-        set_show_toolbar(false);
         _bstr_baseurl = NULL;
         _bstr_mrl     = NULL;
         _b_visible    = TRUE;
@@ -534,8 +533,6 @@ void VLCPlugin::initVLC()
     if( !vlc_player::open(_p_libvlc) )
         return;
 
-    set_player_window();
-
     // initial playlist item
     if( SysStringLen(_bstr_mrl) > 0 )
     {
@@ -580,6 +577,18 @@ void VLCPlugin::initVLC()
             CoTaskMemFree(psz_mrl);
         }
     }
+
+    if( !isInPlaceActive()  )
+    {
+        LPOLECLIENTSITE pClientSite;
+        if( SUCCEEDED(vlcOleObject->GetClientSite(&pClientSite)) && (NULL != pClientSite) )
+        {
+            vlcOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL, pClientSite, 0, NULL, NULL);
+            pClientSite->Release();
+        }
+    }
+
+    set_player_window();
 };
 
 void VLCPlugin::setErrorInfo(REFIID riid, const char *description)



More information about the vlc-commits mailing list