diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-05-18 14:05:55 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-05-18 14:05:55 -0400 |
commit | 6f569cdca6e2da6bbfb09152cd3006e22b8d2356 (patch) | |
tree | 4d8176dfc30cfb9bb906bc8cd4faffa8f86089b3 | |
parent | 7f0e0e2d10099b8b81c8b43cc37a673fb5232989 (diff) |
Made SHIFT+{Left,Right} keyboard events work from the findbar
-rw-r--r-- | src/findbar.cc | 8 | ||||
-rw-r--r-- | src/uicmd.cc | 14 |
2 files changed, 4 insertions, 18 deletions
diff --git a/src/findbar.cc b/src/findbar.cc index cb0b345b..02f9545b 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -36,10 +36,10 @@ int MyInput::handle(int e) unsigned modifier = Fl::event_state() & (FL_SHIFT| FL_CTRL| FL_ALT|FL_META); if (e == FL_KEYBOARD) { - if (k == FL_Left || k == FL_Right) { - if (modifier == FL_SHIFT) { - a_UIcmd_send_event_to_tabs_by_wid(e, this); - return 1; + if (modifier == FL_SHIFT) { + if (k == FL_Left || k == FL_Right) { + // Let these keys get to the UI + return 0; } } else if (k == FL_Escape && modifier == 0) { // Avoid clearing the text with Esc, just hide the findbar. diff --git a/src/uicmd.cc b/src/uicmd.cc index b403d827..1e58df51 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -341,20 +341,6 @@ BrowserWindow *a_UIcmd_get_bw_by_widget(void *v_wid) } /* - * FLTK regards SHIFT + {Left, Right} as navigation keys. - * Special handling is required to override it. Here we route - * these events directly to the recipient. - * TODO: focus is not remembered correctly. - */ -void a_UIcmd_send_event_to_tabs_by_wid(int e, void *v_wid) -{ - BrowserWindow *bw = a_UIcmd_get_bw_by_widget(v_wid); - UI *ui = (UI*)bw->ui; - if (ui->tabs()) - ui->tabs()->handle(e); -} - -/* * Create a new UI and its associated BrowserWindow data structure. * Use style from v_ui. If non-NULL it must be of type UI*. */ |