aboutsummaryrefslogtreecommitdiff
path: root/dw/fltkviewport.cc
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2011-06-29 14:48:09 -0400
committerJorge Arellano Cid <jcid@dillo.org>2011-06-29 14:48:09 -0400
commitaaae993f7f01bbaa7e8f40ad36aebed3e14eb473 (patch)
tree5a9268397b920418824cdb7304af1101cf8d8035 /dw/fltkviewport.cc
parent165a8787e7230c82831ce33eeeae804149a33dd6 (diff)
Fixed a bug that made the main area lose keyboard events with selection lists
Diffstat (limited to 'dw/fltkviewport.cc')
-rw-r--r--dw/fltkviewport.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/dw/fltkviewport.cc b/dw/fltkviewport.cc
index 992df22b..11994d0d 100644
--- a/dw/fltkviewport.cc
+++ b/dw/fltkviewport.cc
@@ -229,13 +229,20 @@ int FltkViewport::handle (int event)
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;