--- gtk/spicy-screenshot.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gtk/spicy-screenshot.c b/gtk/spicy-screenshot.c index 2595d0c..43664b6 100644 --- a/gtk/spicy-screenshot.c +++ b/gtk/spicy-screenshot.c @@ -95,10 +95,28 @@ static void invalidate(SpiceChannel *channel, g_main_loop_quit(mainloop); } +static void main_channel_event(SpiceChannel *channel, SpiceChannelEvent event, + gpointer data) +{ + switch (event) { + case SPICE_CHANNEL_OPENED: + break; + default: + g_warning("main channel event: %d", event); + g_main_loop_quit(mainloop); + } +} + static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer *data) { int id; + if (SPICE_IS_MAIN_CHANNEL(channel)) { + g_signal_connect(channel, "channel-event", + G_CALLBACK(main_channel_event), data); + return; + } + if (!SPICE_IS_DISPLAY_CHANNEL(channel)) return; -- 1.8.1.1.439.g50a6b54 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel