[Spice-devel] [RFC v4 50/62] server/red_worker: handle_dev_input RED_WORKER_MESSAGE_STOP: all clients

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


---
 server/red_worker.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 5fb8a5f..fe21a4c 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -10404,6 +10404,8 @@ static void handle_dev_input(EventListener *listener, uint32_t events)
     RedChannel *cursor_red_channel = &worker->cursor_channel->common.base;
     RedChannel *display_red_channel = &worker->display_channel->common.base;
     int ring_is_empty;
+    RingItem *link;
+    Surfaces *surfaces;
 
     read_message(worker->channel, &message);
 
@@ -10500,10 +10502,12 @@ static void handle_dev_input(EventListener *listener, uint32_t events)
         red_printf("stop");
         ASSERT(worker->running);
         worker->running = FALSE;
-        red_display_client_clear_glz_drawables(worker->surfaces.dcc);
-        for (x = 0; x < NUM_SURFACES; ++x) {
-            if (worker->surfaces.surfaces[x].context.canvas) {
-                red_current_flush(worker, &worker->surfaces, x);
+        red_display_clear_glz_drawables(worker->display_channel);
+        SURFACES_FOREACH(link, surfaces, worker) {
+            for (x = 0; x < NUM_SURFACES; ++x) {
+                if (surfaces->surfaces[x].context.canvas) {
+                    red_current_flush(worker, surfaces, x);
+                }
             }
         }
         red_cursor_flush(worker);
-- 
1.7.4.4



More information about the Spice-devel mailing list