mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 21:03:10 +00:00
server: fix red_current_flush to flush only the surface that was given as parameter
A side effect of the previous red_current_flush, which flushed all the surfaces, and was called on a new display channel connection, was that red_handle_drawable_surfaces_client_synced sent the most updated surfaces images when needed. However, now, it should explicitly call red_current_flush. Moreover, since red_current_flush was called on a new display channel connection only if there was a primary surface, if the connection of the display channel occurred at the moment of no primary surface, red_handle_drawable_surfaces_client_synced was buggy.
This commit is contained in:
parent
e13be77f33
commit
fbd874a464
@ -1235,6 +1235,7 @@ static inline void red_handle_drawable_surfaces_client_synced(RedWorker *worker,
|
||||
continue;
|
||||
}
|
||||
red_create_surface_item(worker, surface_id);
|
||||
red_current_flush(worker, surface_id);
|
||||
red_add_surface_image(worker, surface_id);
|
||||
}
|
||||
}
|
||||
@ -1244,6 +1245,7 @@ static inline void red_handle_drawable_surfaces_client_synced(RedWorker *worker,
|
||||
}
|
||||
|
||||
red_create_surface_item(worker, drawable->surface_id);
|
||||
red_current_flush(worker, drawable->surface_id);
|
||||
red_add_surface_image(worker, drawable->surface_id);
|
||||
}
|
||||
|
||||
@ -4417,7 +4419,7 @@ static void red_free_some(RedWorker *worker)
|
||||
|
||||
static void red_current_flush(RedWorker *worker, int surface_id)
|
||||
{
|
||||
while (!ring_is_empty(&worker->current_list)) {
|
||||
while (!ring_is_empty(&worker->surfaces[surface_id].current_list)) {
|
||||
free_one_drawable(worker, FALSE);
|
||||
}
|
||||
red_current_clear(worker, surface_id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user