Fl_Menu_Item::test_shortcut doesn't seem to be involved at the second shortcut 
attempt.

Maybe it's possible to do something about this in Fl_Menu_Item::find_shortcut 
instead? It's from there Fl_Widget::test_shortcut is called when failing 
because of the lack of Alt key.

Haven't figured out just what to do there yet, but maybe you had a specific 
idea? Do we "know" enough in Fl_Menu_Item::find_shortcut?

/ANdreas

>
> > Looking at the code a bit (I don't have much time free, so can't look=20
> > into this properly) I think the way forward might actually be=20
> > to leave=20
> > fl_shortcut.cxx alone and modify Fl_Menu.cxx instead.
> >=20
> > It contains a method:
> >=20
> >     const Fl_Menu_Item* Fl_Menu_Item::test_shortcut()
> >=20
> > That more or less "knows" if we are in a top-level menu or=20
> > not, before=20
> > calling the "real" test_shortcut() from fl_shorcut.cxx.
> >=20
> > So, it may be possible to have the=20
> > Fl_Menu_Item::test_shortcut() method=20
> > test for the ALT flag and maybe force it set temporarily=20
> > before it calls=20
> > test_shortcut(), when processing what it knows to be a submenu item...
> > Well, something like that.
> >=20
> > I can't test this as I don't have a Windows machine here just=20
> > now. But=20
> > if you want to give it a try, we'd be interested in the results.
>
>
> Hmm, I tried this as a quick hack. Did not work - though I may have
> hacked it wrong, of course.
> No more time for this right now.
> Anybody got an idea how we do this?
>
> The trick to make it behave like Windows is that the ALT key is required
> to select the menu, but once the menu is open, the ALT key is no longer
> required to select items in the menu that is shown... Though if the ALT
> key is pressed too, that also works fine.
>
> The current code (with the #2199 fix) requires ALT in both cases. Though
> I suspect that many users just hold the ALT key down anyway and don't
> even notice that we have an issue here!
>
>
>
> SELEX Galileo Ltd
> Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS=
> 14 3EL
> A company registered in England & Wales.  Company no. 02426132
> ********************************************************************
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender.
> You should not copy it or use it for any purpose nor disclose or
> distribute its contents to any other person.
> ********************************************************************
>

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to