menu_view: unhover on touch-release

Issue #5496
Issue #5485
This commit is contained in:
Norman Feske 2025-04-11 18:10:44 +02:00
parent c17653dafa
commit b540716cf4

View File

@ -302,15 +302,16 @@ void Menu_view::Dialog::_handle_input()
ev.handle_absolute_motion([&] (int x, int y) {
hover_at(x, y); });
if (ev.hover_leave())
unhover();
ev.handle_touch([&] (Input::Touch_id id, float x, float y) {
if (id.value == 0)
hover_at((int)x, (int)y); });
/*
* Reset hover model when losing the focus
*/
if (ev.hover_leave())
unhover();
ev.handle_touch_release([&] (Input::Touch_id id) {
if (id.value == 0)
unhover(); });
});
bool const hover_changed = orig_hovered != _hovered