user: Fix disabled menu item behavior
Thomas Kho
tkho at ucla.edu
Fri Apr 14 22:19:05 CDT 2006
On 4/14/06, Dan Kegel <dank at kegel.com> wrote:
> Tommy Kho wrote:
> >This patch changes the behavior of selecting greyed out menu items via
> >accelerator key. Wine currently keeps the menu open; Windows closes the menu.
> > ...
> > else
> >+ {
> > pmt->hCurrentMenu = MENU_ShowSubPopup(pmt->hOwnerWnd, hMenu, TRUE, wFlags);
> >+ return -1;
> >+ }
> >
> >- return -1;
> >+ return -2;
> > }
>
> Err, isn't the return -2 at the bottom dead code now?
> That seems wrong...
It's not dead code because the if block paired with the else doesn't
always return, but the patch does actually trade one inconformance for
another. Clicking on disabled items with the mouse should not close
the menu, which happens with this patch.
Tommy
More information about the wine-devel
mailing list