From dffa32a72c173038137bd738f1186335c83df519 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 7 Nov 2024 15:13:32 +0100 Subject: [PATCH] menu_view: don't skip frames after idle When updating a dialog after a prolonged idle time with no active animatons, the next _handle_gui_sync would wrongly fast-forward animations for all the frames passed since the last _handle_gui_sync. On the PinePhone, this effect is clearly visible when switching between the main section. The GUI jumps from one state to another instead of transitioning. This patch solves the issue be resetting '_previous_sync' when waking up from idle. Related to issue #5347 --- repos/gems/src/app/menu_view/dialog.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/gems/src/app/menu_view/dialog.h b/repos/gems/src/app/menu_view/dialog.h index 7571541a40..80cc7e0e78 100644 --- a/repos/gems/src/app/menu_view/dialog.h +++ b/repos/gems/src/app/menu_view/dialog.h @@ -265,11 +265,12 @@ void Menu_view::Dialog::_handle_dialog() _action.hover_changed(); if (!_gui_sync_enabled) { + _previous_sync = _action.now(); _gui.framebuffer.sync_sigh(_gui_sync_handler); _gui_sync_enabled = true; } - _handle_gui_sync(); + _redraw(); }