Mercurial > dillo_port1.3
changeset 2111:eca3cff41427
Fixed a bug that made the main area lose keyboard events with selection lists
author | Jorge Arellano Cid <jcid@dillo.org> |
---|---|
date | Wed, 29 Jun 2011 14:48:09 -0400 |
parents | eabfdc600c31 |
children | 842076515462 |
files | dw/fltkviewport.cc |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dw/fltkviewport.cc Wed Jun 29 13:08:45 2011 -0400 +++ b/dw/fltkviewport.cc Wed Jun 29 14:48:09 2011 -0400 @@ -229,13 +229,20 @@ switch(event) { case FL_KEYBOARD: - /* Tell fltk we want to receive KEYBOARD events as SHORTCUT. - * As we don't know the exact keybindings set by the user, we ask + /* When the viewport has focus (and not one of its children), FLTK + * sends the event here. Returning zero tells FLTK to resend the + * event as SHORTCUT, which we finally route to the parent. */ + + /* As we don't know the exact keybindings set by the user, we ask * for all of them (except Tab to keep form navigation). */ if (Fl::event_key() != FL_Tab) return 0; break; + case FL_SHORTCUT: + /* send it to the parent (UI) */ + return 0; + case FL_FOCUS: /** \bug Draw focus box. */ break;