Author: dquintana
Date: Sat Jan 17 12:59:57 2015
New Revision: 66046
URL:
http://svn.reactos.org/svn/reactos?rev=66046&view=rev
Log:
[RSHELL]
* Fix a long-lived signed/unsigned mismatch that may or may not have caused a few issues
when hot-tracking the menubar.
Modified:
trunk/reactos/base/shell/rshell/CMenuToolbars.cpp
Modified: trunk/reactos/base/shell/rshell/CMenuToolbars.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/CMenuToo…
==============================================================================
--- trunk/reactos/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Sat Jan 17 12:59:57
2015
@@ -640,14 +640,15 @@
LRESULT CMenuToolbarBase::IsTrackedItem(UINT uMsg, WPARAM wParam, LPARAM lParam,
BOOL& bHandled)
{
TBBUTTON btn;
+ INT idx = (INT)wParam;
if (m_hotBar != this)
return S_FALSE;
- if (wParam < 0)
+ if (idx < 0)
return S_FALSE;
- if (!GetButton(wParam, &btn))
+ if (!GetButton(idx, &btn))
return E_FAIL;
if (m_hotItem == btn.idCommand)
@@ -661,21 +662,21 @@
LRESULT CMenuToolbarBase::ChangeTrackedItem(UINT uMsg, WPARAM wParam, LPARAM lParam,
BOOL& bHandled)
{
+ TBBUTTON btn;
BOOL wasTracking = LOWORD(lParam);
BOOL mouse = HIWORD(lParam);
-
- TBBUTTON btn;
-
- if (wParam < 0)
+ INT idx = (INT)wParam;
+
+ if (idx < 0)
{
m_isTrackingPopup = FALSE;
return m_menuBand->_ChangeHotItem(NULL, -1, HICF_MOUSE);
}
- if (!GetButton(wParam, &btn))
+ if (!GetButton(idx, &btn))
return E_FAIL;
- TRACE("ChangeTrackedItem %d, %d\n", wParam, wasTracking);
+ TRACE("ChangeTrackedItem %d, %d\n", idx, wasTracking);
m_isTrackingPopup = wasTracking;
return m_menuBand->_ChangeHotItem(this, btn.idCommand, mouse ? HICF_MOUSE : 0);
}