[client] wayland: make waitFrame work when not rendering

Implement skipFrame and do various things to wake waitFrame.
This commit is contained in:
Quantum
2021-08-01 04:06:35 -04:00
committed by Geoffrey McRae
parent 16aa04d539
commit 2e4614cbc4
5 changed files with 16 additions and 0 deletions

View File

@@ -144,3 +144,14 @@ void waylandWaitFrame(void)
if (callback)
wl_callback_add_listener(callback, &frame_listener, NULL);
}
void waylandSkipFrame(void)
{
// If we decided to not render, we must commit the surface so that the callback is registered.
wl_surface_commit(wlWm.surface);
}
void waylandForceRender(void)
{
lgSignalEvent(wlWm.frameEvent);
}