diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index cad4f757e..cfe0a8261 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -347,6 +347,7 @@ struct Sculpt::Main : Input_event_handler, && !_graph.add_button_hovered()) { _popup.state = Popup::OFF; + _popup_dialog.reset_hover(); /* de-select '+' button */ _graph._gen_graph_dialog(); @@ -406,6 +407,7 @@ struct Sculpt::Main : Input_event_handler, /* close popup menu */ _popup.state = Popup::OFF; + _popup_dialog.reset_hover(); _handle_window_layout(); /* reset state of the '+' button */ diff --git a/repos/gems/src/app/sculpt_manager/view/popup_dialog.h b/repos/gems/src/app/sculpt_manager/view/popup_dialog.h index 57cd48c3c..69268fbda 100644 --- a/repos/gems/src/app/sculpt_manager/view/popup_dialog.h +++ b/repos/gems/src/app/sculpt_manager/view/popup_dialog.h @@ -102,6 +102,23 @@ struct Sculpt::Popup_dialog action.launch_global(_item._hovered); } + /* + * XXX + * + * This method should not be needed. However, in some situations, + * the popup menu_view does not receive a leave event when the popup + * is closed, to the effect of maintaining stale hover information + * instead of generating an empty hover report. So from the sculpt- + * manager's point of view, the popup is still hovered even if it is + * actually closed. The 'reset_hover' shortcuts the regular hover + * update in this situation. + */ + void reset_hover() + { + _item._hovered = Hoverable_item::Id(); + _hovered = false; + } + Popup_dialog(Env &env, Launchers const &launchers, Runtime_info const &runtime_info) :