user: Fix disabled menu item behavior
tkho at ucla.edu
tkho at ucla.edu
Fri Apr 14 17:03:17 CDT 2006
Hello,
This patch changes the behavior of selecting greyed out menu items via
accelerator key. Wine currently keeps the menu open; Windows closes the menu.
Thanks,
Thomas Kho
2006-04-14 Thomas Kho <tkho at ucla.edu>
* dlls/user/menu.c:
user: close menu when greyed-out item is selected via accelerator key
menu.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Signed-off-by: Thomas Kho <tkho at ucla.edu>
Index: dlls/user/menu.c
===================================================================
RCS file: /home/wine/wine/dlls/user/menu.c,v
retrieving revision 1.59
diff -u -r1.59 menu.c
--- dlls/user/menu.c 13 Apr 2006 10:18:13 -0000 1.59
+++ dlls/user/menu.c 14 Apr 2006 21:49:11 -0000
@@ -2398,7 +2398,7 @@
*
* Execute a menu item (for instance when user pressed Enter).
* Return the wID of the executed item. Otherwise, -1 indicating
- * that no menu item was executed;
+ * that no menu item was executed, -2 if we should close the menu;
* Have to receive the flags for the TrackPopupMenu options to avoid
* sending unwanted message.
*
@@ -2435,9 +2435,12 @@
}
}
else
+ {
pmt->hCurrentMenu = MENU_ShowSubPopup(pmt->hOwnerWnd, hMenu, TRUE, wFlags);
+ return -1;
+ }
- return -1;
+ return -2;
}
/***********************************************************************
More information about the wine-patches
mailing list