mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:05:43 +00:00
[RSHELL]
* Prevent the focused window from receiving keyboard events while a shell menu is open. CORE-7586 svn path=/branches/shell-experiments/; revision=62935
This commit is contained in:
parent
78790baf2e
commit
663bc1da24
4 changed files with 20 additions and 2 deletions
|
@ -868,6 +868,10 @@ HRESULT CMenuBand::_MenuItemHotTrack(DWORD changeType)
|
||||||
|
|
||||||
switch (changeType)
|
switch (changeType)
|
||||||
{
|
{
|
||||||
|
case MPOS_EXECUTE:
|
||||||
|
m_hotBar->ExecuteItem(m_hotItem);
|
||||||
|
break;
|
||||||
|
|
||||||
case MPOS_SELECTLEFT:
|
case MPOS_SELECTLEFT:
|
||||||
if (m_parentBand && m_parentBand->_IsPopup()==S_FALSE)
|
if (m_parentBand && m_parentBand->_IsPopup()==S_FALSE)
|
||||||
return m_parentBand->_MenuItemHotTrack(VK_LEFT);
|
return m_parentBand->_MenuItemHotTrack(VK_LEFT);
|
||||||
|
|
|
@ -442,6 +442,9 @@ LRESULT CMenuFocusManager::GetMsgHook(INT nCode, WPARAM hookWParam, LPARAM hookL
|
||||||
case VK_RMENU:
|
case VK_RMENU:
|
||||||
m_current->mb->_MenuItemHotTrack(MPOS_FULLCANCEL);
|
m_current->mb->_MenuItemHotTrack(MPOS_FULLCANCEL);
|
||||||
break;
|
break;
|
||||||
|
case VK_RETURN:
|
||||||
|
m_current->mb->_MenuItemHotTrack(MPOS_EXECUTE);
|
||||||
|
break;
|
||||||
case VK_LEFT:
|
case VK_LEFT:
|
||||||
m_current->mb->_MenuItemHotTrack(VK_LEFT);
|
m_current->mb->_MenuItemHotTrack(VK_LEFT);
|
||||||
break;
|
break;
|
||||||
|
@ -455,6 +458,9 @@ LRESULT CMenuFocusManager::GetMsgHook(INT nCode, WPARAM hookWParam, LPARAM hookL
|
||||||
m_current->mb->_MenuItemHotTrack(VK_DOWN);
|
m_current->mb->_MenuItemHotTrack(VK_DOWN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
msg->message = WM_NULL;
|
||||||
|
msg->lParam = 0;
|
||||||
|
msg->wParam = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -814,9 +814,16 @@ HRESULT CMenuToolbarBase::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT *theRe
|
||||||
|
|
||||||
*theResult = 0;
|
*theResult = 0;
|
||||||
|
|
||||||
|
INT iItem = (INT)wParam;
|
||||||
|
|
||||||
|
return ExecuteItem(iItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CMenuToolbarBase::ExecuteItem(INT iItem)
|
||||||
|
{
|
||||||
m_menuBand->_KillPopupTimers();
|
m_menuBand->_KillPopupTimers();
|
||||||
|
|
||||||
if (PopupItem(wParam) == S_OK)
|
if (PopupItem(iItem) == S_OK)
|
||||||
{
|
{
|
||||||
TRACE("PopupItem returned S_OK\n");
|
TRACE("PopupItem returned S_OK\n");
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
|
@ -829,7 +836,6 @@ HRESULT CMenuToolbarBase::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT *theRe
|
||||||
if (FAILED_UNEXPECTEDLY(hr))
|
if (FAILED_UNEXPECTEDLY(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
INT iItem = wParam;
|
|
||||||
INT index;
|
INT index;
|
||||||
DWORD_PTR data;
|
DWORD_PTR data;
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,8 @@ public:
|
||||||
|
|
||||||
HRESULT KeyboardItemChange(DWORD changeType);
|
HRESULT KeyboardItemChange(DWORD changeType);
|
||||||
|
|
||||||
|
HRESULT ExecuteItem(INT iItem);
|
||||||
|
|
||||||
HRESULT IsTrackedItem(INT index);
|
HRESULT IsTrackedItem(INT index);
|
||||||
HRESULT ChangeTrackedItem(INT index, BOOL wasTracking, BOOL mouse);
|
HRESULT ChangeTrackedItem(INT index, BOOL wasTracking, BOOL mouse);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue