[PATCH] Fix regression in alt, then right processing with eg wines notepad

Jason Edmeades jason.edmeades at googlemail.com
Sun Aug 12 16:29:02 CDT 2007


My previous fix to skip the mdi maximixed child window buttons in mdi
windows works nicely unless there is no such buttons, when there is an
off by one calculation. This prevents the right hand most menu from being
selected if you alt, down, then right arrow through the menus

Apologies for that!
---
 dlls/user32/menu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 2a2d3ab..3a75005 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -2682,13 +2682,13 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk )
     else if ((vk == VK_RIGHT) && !IS_SYSTEM_MENU(menu))
     {
         int i = menu->FocusedItem + 1;
-        while (i < (menu->nItems - 1)) {
+        while (i < menu->nItems) {
             if ((menu->items[i].wID >= SC_SIZE &&
                  menu->items[i].wID <= SC_RESTORE)) {
                 i++;
             } else break;
         }
-        if (i == (menu->nItems - 1)) {
+        if (i == menu->nItems) {
             atEnd = TRUE;
         }
     }
-- 
1.5.0




More information about the wine-patches mailing list