Author: gadamopoulos
Date: Mon May 30 20:28:30 2016
New Revision: 71461
URL:
http://svn.reactos.org/svn/reactos?rev=71461&view=rev
Log:
[BROWSEUI]
- CBaseBar, CBaseBarSite: Implement IInputObject and IInputObjectSite interfaces
- Part of the work submitted by Sylvain Deverre. Simplified by me.
CORE-8814 and CORE-10838
Modified:
trunk/reactos/dll/win32/browseui/basebar.cpp
trunk/reactos/dll/win32/browseui/basebarsite.cpp
Modified: trunk/reactos/dll/win32/browseui/basebar.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/basebar…
==============================================================================
--- trunk/reactos/dll/win32/browseui/basebar.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/basebar.cpp [iso-8859-1] Mon May 30 20:28:30 2016
@@ -241,8 +241,7 @@
HRESULT STDMETHODCALLTYPE CBaseBar::OnFocusChangeIS (IUnknown *punkObj, BOOL fSetFocus)
{
- // forward to owner
- return E_NOTIMPL;
+ return IUnknown_OnFocusChangeIS(fSite, punkObj, fSetFocus);
}
HRESULT STDMETHODCALLTYPE CBaseBar::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds,
@@ -291,20 +290,17 @@
HRESULT STDMETHODCALLTYPE CBaseBar::UIActivateIO(BOOL fActivate, LPMSG lpMsg)
{
- // forward to contained bar
- return S_OK;
+ return IUnknown_UIActivateIO(fClient, fActivate, lpMsg);
}
HRESULT STDMETHODCALLTYPE CBaseBar::HasFocusIO()
{
- // forward to contained bar
- return S_OK;
+ return IUnknown_HasFocusIO(fClient);
}
HRESULT STDMETHODCALLTYPE CBaseBar::TranslateAcceleratorIO(LPMSG lpMsg)
{
- // forward to contained bar
- return S_FALSE;
+ return IUnknown_TranslateAcceleratorIO(fClient, lpMsg);
}
HRESULT STDMETHODCALLTYPE CBaseBar::SetClient(IUnknown *punkClient)
Modified: trunk/reactos/dll/win32/browseui/basebarsite.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/basebar…
==============================================================================
--- trunk/reactos/dll/win32/browseui/basebarsite.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/basebarsite.cpp [iso-8859-1] Mon May 30 20:28:30
2016
@@ -248,17 +248,33 @@
HRESULT STDMETHODCALLTYPE CBaseBarSite::UIActivateIO(BOOL fActivate, LPMSG lpMsg)
{
- return E_NOTIMPL;
+ if (!fCurrentActiveBar)
+ return S_OK;
+
+ return IUnknown_UIActivateIO(fCurrentActiveBar->fTheBar, fActivate, lpMsg);
}
HRESULT STDMETHODCALLTYPE CBaseBarSite::HasFocusIO()
{
- return E_NOTIMPL;
+ if (!fCurrentActiveBar)
+ return S_FALSE;
+
+ return IUnknown_HasFocusIO(fCurrentActiveBar->fTheBar);
}
HRESULT STDMETHODCALLTYPE CBaseBarSite::TranslateAcceleratorIO(LPMSG lpMsg)
{
- return E_NOTIMPL;
+ if (!fCurrentActiveBar)
+ {
+ if (lpMsg)
+ {
+ TranslateMessage(lpMsg);
+ DispatchMessage(lpMsg);
+ }
+ return S_OK;
+ }
+
+ return IUnknown_TranslateAcceleratorIO(fCurrentActiveBar->fTheBar, lpMsg);
}
HRESULT STDMETHODCALLTYPE CBaseBarSite::QueryService(REFGUID guidService, REFIID riid,
void **ppvObject)
@@ -314,7 +330,8 @@
HRESULT STDMETHODCALLTYPE CBaseBarSite::OnFocusChangeIS (IUnknown *punkObj, BOOL
fSetFocus)
{
- return E_NOTIMPL;
+ // FIXME: should we directly pass-through, or advertise ourselves as focus owner ?
+ return IUnknown_OnFocusChangeIS(fDeskBarSite, punkObj, fSetFocus);
}
HRESULT STDMETHODCALLTYPE CBaseBarSite::SetDeskBarSite(IUnknown *punkSite)