sculpt: update menu when folding condition changed

The storage dialog is folded when activating the runtime view (e.g., by
clicking on the Genode Logo). This should happen immediately as response
of the mouse click.
This commit is contained in:
Norman Feske 2019-03-10 18:09:33 +01:00 committed by Christian Helmuth
parent 122c404883
commit 41575ad60d

View File

@ -466,11 +466,14 @@ struct Sculpt::Main : Input_event_handler,
*/
void handle_input_event(Input::Event const &ev) override
{
bool need_generate_dialog = false;
if (ev.key_press(Input::BTN_LEFT)) {
if (_hovered_dialog != _last_clicked && _hovered_dialog != Hovered::NONE) {
_last_clicked = _hovered_dialog;
_handle_window_layout();
need_generate_dialog = true;
}
if (_hovered_dialog == Hovered::STORAGE) _storage.dialog.click(_storage);
@ -509,6 +512,9 @@ struct Sculpt::Main : Input_event_handler,
if (ev.press())
_keyboard_focus.update();
if (need_generate_dialog)
generate_dialog();
}
/*