Skip to content

Commit

Permalink
Use keyboard_capture() for filter boxes to trigger focused state
Browse files Browse the repository at this point in the history
This enabled the cursor to appear in it as a visual indicator of focus. Otherwise, this is
functionally identical to add_to_keyboard_chain().
  • Loading branch information
Vultraz committed Aug 3, 2016
1 parent 895774b commit bd9c915
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/dialogs/unit_create.cpp
Expand Up @@ -125,7 +125,7 @@ void tunit_create::pre_show(twindow& window)
filter->set_text_changed_callback(
std::bind(&tunit_create::filter_text_changed, this, _1, _2));

window.add_to_keyboard_chain(filter);
window.keyboard_capture(filter);
window.add_to_keyboard_chain(&list);

#ifdef GUI2_EXPERIMENTAL_LISTBOX
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/unit_recall.cpp
Expand Up @@ -173,7 +173,7 @@ void tunit_recall::pre_show(twindow& window)

list.clear();

window.add_to_keyboard_chain(filter);
window.keyboard_capture(filter);
window.add_to_keyboard_chain(&list);

connect_signal_mouse_left_click(
Expand Down

0 comments on commit bd9c915

Please sign in to comment.