Author: dquintana
Date: Thu Apr 24 11:25:46 2014
New Revision: 62935
URL:
http://svn.reactos.org/svn/reactos?rev=62935&view=rev
Log:
[RSHELL]
* Prevent the focused window from receiving keyboard events while a shell menu is open.
CORE-7586
Modified:
branches/shell-experiments/base/shell/rshell/CMenuBand.cpp
branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp
branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp
branches/shell-experiments/base/shell/rshell/CMenuToolbars.h
Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Thu Apr 24
11:25:46 2014
@@ -868,6 +868,10 @@
switch (changeType)
{
+ case MPOS_EXECUTE:
+ m_hotBar->ExecuteItem(m_hotItem);
+ break;
+
case MPOS_SELECTLEFT:
if (m_parentBand && m_parentBand->_IsPopup()==S_FALSE)
return m_parentBand->_MenuItemHotTrack(VK_LEFT);
Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1] Thu
Apr 24 11:25:46 2014
@@ -442,6 +442,9 @@
case VK_RMENU:
m_current->mb->_MenuItemHotTrack(MPOS_FULLCANCEL);
break;
+ case VK_RETURN:
+ m_current->mb->_MenuItemHotTrack(MPOS_EXECUTE);
+ break;
case VK_LEFT:
m_current->mb->_MenuItemHotTrack(VK_LEFT);
break;
@@ -455,6 +458,9 @@
m_current->mb->_MenuItemHotTrack(VK_DOWN);
break;
}
+ msg->message = WM_NULL;
+ msg->lParam = 0;
+ msg->wParam = 0;
}
break;
}
Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Thu Apr 24
11:25:46 2014
@@ -814,9 +814,16 @@
*theResult = 0;
+ INT iItem = (INT)wParam;
+
+ return ExecuteItem(iItem);
+}
+
+HRESULT CMenuToolbarBase::ExecuteItem(INT iItem)
+{
m_menuBand->_KillPopupTimers();
- if (PopupItem(wParam) == S_OK)
+ if (PopupItem(iItem) == S_OK)
{
TRACE("PopupItem returned S_OK\n");
return S_FALSE;
@@ -829,7 +836,6 @@
if (FAILED_UNEXPECTEDLY(hr))
return hr;
- INT iItem = wParam;
INT index;
DWORD_PTR data;
Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuToolbars.h [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.h [iso-8859-1] Thu Apr 24
11:25:46 2014
@@ -76,6 +76,8 @@
HRESULT TrackContextMenu(IContextMenu* contextMenu, POINT pt);
HRESULT KeyboardItemChange(DWORD changeType);
+
+ HRESULT ExecuteItem(INT iItem);
HRESULT IsTrackedItem(INT index);
HRESULT ChangeTrackedItem(INT index, BOOL wasTracking, BOOL mouse);