From 41575ad60df80965593c72b051023289bd269228 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sun, 10 Mar 2019 18:09:33 +0100 Subject: [PATCH] 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. --- repos/gems/src/app/sculpt_manager/main.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index c494285b9c..ab8650a510 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -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(); } /*