mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 21:57:55 +00:00
nitpicker: fix stale pixels in request-fb mode
When nitpicker is used as nitpicker client as is the case for Sculpt's Leitzentrale, the time to sleep was tracked wrongly. The fb sync stays alive only if a refresh operation is actually issued. Issue #5347 Issue #5356
This commit is contained in:
parent
135a866ec0
commit
5f4e1db576
@ -494,6 +494,8 @@ struct Nitpicker::Main : Focus_updater, Hover_updater,
|
|||||||
dirty_rect.flush([&] (Rect const &rect) {
|
dirty_rect.flush([&] (Rect const &rect) {
|
||||||
_main._view_stack.draw(_screen, rect); });
|
_main._view_stack.draw(_screen, rect); });
|
||||||
|
|
||||||
|
bool const any_pixels_refreshed = !_dirty_rect.empty();
|
||||||
|
|
||||||
/* flush pixels to the framebuffer, reset dirty_rect */
|
/* flush pixels to the framebuffer, reset dirty_rect */
|
||||||
_dirty_rect.flush([&] (Rect const &rect) {
|
_dirty_rect.flush([&] (Rect const &rect) {
|
||||||
_fb.refresh(rect); });
|
_fb.refresh(rect); });
|
||||||
@ -502,6 +504,7 @@ struct Nitpicker::Main : Focus_updater, Hover_updater,
|
|||||||
for (Gui_session *s = _main._session_list.first(); s; s = s->next())
|
for (Gui_session *s = _main._session_list.first(); s; s = s->next())
|
||||||
s->submit_sync();
|
s->submit_sync();
|
||||||
|
|
||||||
|
if (any_pixels_refreshed)
|
||||||
_previous_sync = _main._now();
|
_previous_sync = _main._now();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user