diff --git a/repos/gems/src/app/sculpt_manager/keyboard_focus.h b/repos/gems/src/app/sculpt_manager/keyboard_focus.h index 65e2de3552..d0ee3468a0 100644 --- a/repos/gems/src/app/sculpt_manager/keyboard_focus.h +++ b/repos/gems/src/app/sculpt_manager/keyboard_focus.h @@ -48,7 +48,7 @@ struct Sculpt::Keyboard_focus target = UNDEFINED; - if (_panel.inspect_tab_visible()) + if (_panel.inspect_tab_selected() || _panel.files_tab_selected()) target = WM; if ((_popup.state == Popup::VISIBLE) && _popup_dialog.keyboard_needed()) diff --git a/repos/gems/src/app/sculpt_manager/view/panel_dialog.h b/repos/gems/src/app/sculpt_manager/view/panel_dialog.h index 497dbbd934..9289c084e3 100644 --- a/repos/gems/src/app/sculpt_manager/view/panel_dialog.h +++ b/repos/gems/src/app/sculpt_manager/view/panel_dialog.h @@ -35,6 +35,9 @@ struct Sculpt::Panel_dialog : Top_level_dialog virtual bool inspect_tab_visible() const = 0; virtual bool system_available() const = 0; virtual bool settings_available() const = 0; + + bool inspect_tab_selected() const { return selected_tab() == Tab::INSPECT; } + bool files_tab_selected() const { return selected_tab() == Tab::FILES; } }; State const &_state;