fix enable state of menus when the mouse is grabbed by a different window

svn: r6105
This commit is contained in:
Matthew Flatt 2007-04-30 21:33:10 +00:00
parent 047346c1c8
commit 88475bd517
2 changed files with 7 additions and 5 deletions

View File

@ -758,9 +758,11 @@ void wxMenuBar::Install(wxWindow *for_frame)
if (!v) {
::DisableMenuItem(mh, 0);
} else {
if (menu_bar_frame)
v = menu_bar_frame->CanAcceptEvent();
else
if (menu_bar_frame) {
/* Don't use CanAcceptEvent(), because that depends on
mouse capture, which is too transient for updating menus. */
v = menu_bar_frame->IsEnable();
} else
v = 1;
if (!v) {
::DisableMenuItem(mh, 0);