swaylock: implement a proper render loop

This commit is contained in:
emersion 2018-05-25 19:34:36 +01:00
parent e4c54b04ce
commit cc10c7af65
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 108 additions and 57 deletions

View file

@ -23,6 +23,10 @@ void render_frame(struct swaylock_surface *surface) {
surface->current_buffer = get_next_buffer(state->shm,
surface->buffers, buffer_width, buffer_height);
if (surface->current_buffer == NULL) {
return;
}
cairo_t *cairo = surface->current_buffer->cairo;
cairo_identity_matrix(cairo);