Author: gedmurphy Date: Sun Oct 5 08:33:41 2008 New Revision: 36657
URL: http://svn.reactos.org/svn/reactos?rev=36657&view=rev Log: Set the start button as the owner of the root start menu. Fix the position of the root start menu
Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp trunk/reactos/base/shell/explorer/taskbar/startmenu.h
Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskbar... ============================================================================== --- trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] Sun Oct 5 08:33:41 2008 @@ -169,7 +169,8 @@ RegisterHotkeys();
// prepare Startmenu, but hide it for now - _startMenuRoot = GET_WINDOW(StartMenuRoot, StartMenuRoot::Create(_hwnd, STARTMENUROOT_ICON_SIZE)); + _startMenuRoot = GET_WINDOW(StartMenuRoot, StartMenuRoot::Create(_hwndStartButton, STARTMENUROOT_ICON_SIZE)); + _startMenuRoot->_hwndParent = _hwndStartButton;
return 0; }
Modified: trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskbar... ============================================================================== --- trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp [iso-8859-1] Sun Oct 5 08:33:41 2008 @@ -1606,8 +1606,6 @@ #ifndef _LIGHT_STARTMENU rect.top += STARTMENU_LINE_HEIGHT(icon_size); #endif - - AdjustWindowRectEx(&rect, WS_POPUP|WS_THICKFRAME|WS_CLIPCHILDREN|WS_VISIBLE, FALSE, 0); }
HWND StartMenuRoot::Create(HWND hwndOwner, int icon_size) @@ -1639,7 +1637,7 @@ // recalculate start menu root position RECT rect;
- CalculateStartPos(GetParent(hwnd), rect, _icon_size); + CalculateStartPos(_hwndParent, rect, _icon_size);
SetWindowPos(hwnd, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, 0);
Modified: trunk/reactos/base/shell/explorer/taskbar/startmenu.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskbar... ============================================================================== --- trunk/reactos/base/shell/explorer/taskbar/startmenu.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/taskbar/startmenu.h [iso-8859-1] Sun Oct 5 08:33:41 2008 @@ -366,7 +366,7 @@ typedef StartMenuHandler super;
StartMenuRoot(HWND hwnd, const StartMenuRootCreateInfo& info); - + HWND _hwndParent; static HWND Create(HWND hwndDesktopBar, int icon_size); void TrackStartmenu();