* Change the way the menu items are activated. Now the menubar activates on mouse down, and the other items activate on mouse up. Not everything works perfectly yet, but it will eventually allow proper usage of the shell menus by keeping the mouse button down. I believe this is also the way to go to avoid the "instant reopening" of the menus when trying to close them.

svn path=/branches/shell-experiments/; revision=63671
This commit is contained in:
David Quintana 2014-06-29 15:42:06 +00:00
parent 80c7746313
commit fd94119fa8
6 changed files with 168 additions and 3 deletions

View file

@ -77,6 +77,10 @@ private:
INT m_selectedItem;
DWORD m_selectedItemFlags;
BOOL m_isLButtonDown;
BOOL m_movedSinceDown;
HWND m_windowAtDown;
// TODO: make dynamic
#define MAX_RECURSE 20
StackEntry m_bandStack[MAX_RECURSE];
@ -109,6 +113,8 @@ private:
void SetCapture(HWND child);
LRESULT ProcessMouseMove(MSG* msg);
LRESULT ProcessMouseDown(MSG* msg);
LRESULT ProcessMouseUp(MSG* msg);
public:
HRESULT PushMenuBar(CMenuBand * mb);
HRESULT PushMenuPopup(CMenuBand * mb);