swaynag: coalesce surface redraw operations

This avoids exhausting the buffer pool when multiple events that would
trigger redraws occur rapidly (for example: scrolling, resizing output).
This commit is contained in:
Manuel Stoeckl 2024-11-08 21:45:51 -05:00
parent 131026b190
commit 49464d233e
3 changed files with 14 additions and 10 deletions

View file

@ -250,6 +250,7 @@ void render_frame(struct swaynag *swaynag) {
if (!swaynag->run_display) {
return;
}
swaynag->needs_redraw = false;
cairo_surface_t *recorder = cairo_recording_surface_create(
CAIRO_CONTENT_COLOR_ALPHA, NULL);