Author: jimtabor Date: Mon Aug 14 18:44:40 2006 New Revision: 23579
URL: http://svn.reactos.org/svn/reactos?rev=23579&view=rev Log: - User32: menu, patch by Michael Kaufmann. Fix the keyboard navigation and some graphical glitches for multi-column menus.
Modified: trunk/reactos/dll/win32/user32/windows/menu.c
Modified: trunk/reactos/dll/win32/user32/windows/menu.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/me... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/menu.c (original) +++ trunk/reactos/dll/win32/user32/windows/menu.c Mon Aug 14 18:44:40 2006 @@ -668,6 +668,7 @@ { HPEN oldPen; RECT rc = Rect; + rc.left -= 3; rc.top = 3; rc.bottom = Height - 3; if (flat_menu) @@ -1408,11 +1409,11 @@ MenuSetRosMenuInfo(MenuInfo); return; } - - if (0 != (ItemInfo.fType & MF_MENUBARBREAK)) - { - OrgX++; - } +// Not sure here,, The patch from wine removes this. +// if (0 != (ItemInfo.fType & MF_MENUBARBREAK)) +// { +// OrgX++; +// } MaxX = max(MaxX, ItemInfo.Rect.right); OrgY = ItemInfo.Rect.bottom; if ((ItemInfo.Text) && 0 != ItemInfo.XTab) @@ -2664,7 +2665,7 @@
for (i++ ; i < MenuInfo->MenuItemCount; i++) { - if (0 != (MenuItems[i].fType & MF_MENUBARBREAK)) + if (0 != (MenuItems[i].fType & (MF_MENUBREAK | MF_MENUBARBREAK))) { return i; } @@ -2696,7 +2697,7 @@ /* Find the start of the column */
for (i = MenuInfo->FocusedItem; - 0 != i && 0 == (MenuItems[i].fType & MF_MENUBARBREAK); + 0 != i && 0 == (MenuItems[i].fType & (MF_MENUBREAK | MF_MENUBARBREAK)); --i) { ; /* empty */ @@ -2710,7 +2711,7 @@
for (--i; 0 != i; --i) { - if (MenuItems[i].fType & MF_MENUBARBREAK) + if (MenuItems[i].fType & (MF_MENUBREAK | MF_MENUBARBREAK)) { break; }