[Spice-devel] [RFC v4 47/62] server/red_worker: handle_dev_destroy_surface_wait: all clients surfaces

Alon Levy alevy at redhat.com
Tue Apr 26 03:55:12 PDT 2011


---
 server/red_worker.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 550bda9..9795dab 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -10236,15 +10236,19 @@ static inline void handle_dev_destroy_surface_wait(RedWorker *worker)
 {
     RedWorkerMessage message;
     uint32_t surface_id;
+    RingItem *link;
+    Surfaces *surfaces;
 
     receive_data(worker->channel, &surface_id, sizeof(uint32_t));
 
     ASSERT(surface_id == 0);
-    
+
     flush_all_qxl_commands(worker);
 
-    if (worker->surfaces.surfaces[0].context.canvas) {
-        destroy_surface_wait(worker, &worker->surfaces, 0);
+    SURFACES_FOREACH(link, surfaces, worker) {
+        if (surfaces->surfaces[0].context.canvas) {
+            destroy_surface_wait(worker, surfaces, 0);
+        }
     }
 
     message = RED_WORKER_MESSAGE_READY;
-- 
1.7.4.4



More information about the Spice-devel mailing list