[SHELLFIND] Remove unnecessary data member for focus

This commit is contained in:
Brock Mammen 2019-08-23 15:33:34 -05:00 committed by Giannis Adamopoulos
parent a905699ac6
commit ff7e9870ce
2 changed files with 2 additions and 5 deletions

View file

@ -33,8 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shellfind);
CSearchBar::CSearchBar() : CSearchBar::CSearchBar() :
pSite(NULL), pSite(NULL),
fVisible(FALSE), fVisible(FALSE)
bFocused(FALSE)
{ {
} }
@ -111,7 +110,6 @@ HRESULT CSearchBar::ExecuteCommand(CComPtr<IContextMenu>& menu, UINT nCmd)
// *** ATL event handlers *** // *** ATL event handlers ***
LRESULT CSearchBar::OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) LRESULT CSearchBar::OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
{ {
bFocused = TRUE;
IUnknown_OnFocusChangeIS(pSite, reinterpret_cast<IUnknown*>(this), TRUE); IUnknown_OnFocusChangeIS(pSite, reinterpret_cast<IUnknown*>(this), TRUE);
bHandled = FALSE; bHandled = FALSE;
return TRUE; return TRUE;
@ -470,7 +468,7 @@ HRESULT STDMETHODCALLTYPE CSearchBar::UIActivateIO(BOOL fActivate, LPMSG lpMsg)
HRESULT STDMETHODCALLTYPE CSearchBar::HasFocusIO() HRESULT STDMETHODCALLTYPE CSearchBar::HasFocusIO()
{ {
return bFocused ? S_OK : S_FALSE; return S_OK;
} }
HRESULT STDMETHODCALLTYPE CSearchBar::TranslateAcceleratorIO(LPMSG lpMsg) HRESULT STDMETHODCALLTYPE CSearchBar::TranslateAcceleratorIO(LPMSG lpMsg)

View file

@ -41,7 +41,6 @@ private:
CComPtr<IUnknown> pSite; CComPtr<IUnknown> pSite;
CComPtr<IAddressEditBox> fAddressEditBox; CComPtr<IAddressEditBox> fAddressEditBox;
BOOL fVisible; BOOL fVisible;
BOOL bFocused;
HRESULT GetSearchResultsFolder(IShellBrowser **ppShellBrowser, HWND *pHwnd, IShellFolder **ppShellFolder); HRESULT GetSearchResultsFolder(IShellBrowser **ppShellBrowser, HWND *pHwnd, IShellFolder **ppShellFolder);
BOOL GetAddressEditBoxPath(WCHAR (&szPath)[MAX_PATH]); BOOL GetAddressEditBoxPath(WCHAR (&szPath)[MAX_PATH]);