From 5cd86fc45dfa94cb08c3316c614923ff50b94b0f Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 29 Jun 2010 18:17:35 +0200 Subject: Update client and protocol to support the new SpiceClipRects --- client/display_channel.cpp | 5 ++--- spice.proto | 2 +- spice1.proto | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/display_channel.cpp b/client/display_channel.cpp index 1bf0744b..e66f845e 100644 --- a/client/display_channel.cpp +++ b/client/display_channel.cpp @@ -1291,9 +1291,8 @@ void DisplayChannel::set_clip_rects(const SpiceClip& clip, uint32_t& num_clip_re { switch (clip.type) { case SPICE_CLIP_TYPE_RECTS: { - uint32_t* n = (uint32_t*)SPICE_GET_ADDRESS(clip.data); - num_clip_rects = *n; - clip_rects = (SpiceRect *)(n + 1); + num_clip_rects = clip.rects->num_rects; + clip_rects = clip.rects->rects; break; } case SPICE_CLIP_TYPE_NONE: diff --git a/spice.proto b/spice.proto index e1062ebb..c3991504 100644 --- a/spice.proto +++ b/spice.proto @@ -412,7 +412,7 @@ struct Clip { clip_type type; switch (type) { case RECTS: - ClipRects *data @outvar(cliprects); + ClipRects *rects @outvar(cliprects) @c_ptr; } u @anon; }; diff --git a/spice1.proto b/spice1.proto index 98ffb495..75749af1 100644 --- a/spice1.proto +++ b/spice1.proto @@ -382,7 +382,7 @@ struct Clip { clip_type type; switch (type) { case RECTS: - ClipRects *data @outvar(cliprects); + ClipRects *rects @outvar(cliprects) @c_ptr; default: uint64 data @zero; } u @anon; -- cgit