[PATCH spice-gtk v2 3/5] display channel: reseting channel caps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


---
 gtk/channel-display.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index 578cb03..801d867 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -103,6 +103,7 @@ static void clear_streams(SpiceChannel *channel);
 static display_surface *find_surface(SpiceDisplayChannelPrivate *c, int surface_id);
 static gboolean display_stream_render(display_stream *st);
 static void spice_display_channel_reset(SpiceChannel *channel, gboolean migrating);
+static void spice_display_channel_reset_capabilities(SpiceChannel *channel);
 static void destroy_canvas(display_surface *surface);
 
 /* ------------------------------------------------------------------ */
@@ -206,6 +207,7 @@ static void spice_display_channel_class_init(SpiceDisplayChannelClass *klass)
     channel_class->handle_msg   = spice_display_handle_msg;
     channel_class->channel_up   = spice_display_channel_up;
     channel_class->channel_reset = spice_display_channel_reset;
+    channel_class->channel_reset_capabilities = spice_display_channel_reset_capabilities;
 
     g_object_class_install_property
         (gobject_class, PROP_HEIGHT,
@@ -584,6 +586,11 @@ static HDC create_compatible_dc(void)
 }
 #endif
 
+static void spice_display_channel_reset_capabilities(SpiceChannel *channel)
+{
+    spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_SIZED_STREAM);
+}
+
 static void spice_display_channel_init(SpiceDisplayChannel *channel)
 {
     SpiceDisplayChannelPrivate *c;
@@ -597,7 +604,7 @@ static void spice_display_channel_init(SpiceDisplayChannel *channel)
 #if defined(WIN32)
     c->dc = create_compatible_dc();
 #endif
-    spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_SIZED_STREAM);
+    spice_display_channel_reset_capabilities(SPICE_CHANNEL(channel));
 }
 
 /* ------------------------------------------------------------------ */
-- 
1.7.7.6

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Tools]     [DDR & Rambus]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

Add to Google