]> git.ozlabs.org Git - petitboot/commitdiff
ui/ncurses: Call widget process_key handlers first
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Thu, 21 Jul 2016 03:03:28 +0000 (13:03 +1000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Thu, 21 Jul 2016 05:39:37 +0000 (15:39 +1000)
Adding KEY_LEFT and KEY_RIGHT brought to light the problem that
widgetset_process_keys() may handle keystrokes that would have also been
handled by a widget's process_keys function. In particular the cursor
in a textbox widget could no longer be moved with the left/right keys.

This updates widgetset_process_keys() to call the focussed widget's
process_keys function before handling the key in any other way. All of
the widget process_keys functions correctly return false if the key is
not relevant to the widget except for textbox_process_key() which is
updated to ignore the main navigational keys.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

No differences found