From 2335feebf50d79e77577a9b45392568e8faf8284 Mon Sep 17 00:00:00 2001 From: Bobby The Builder Date: Sun, 22 Oct 2023 15:05:17 -0400 Subject: Spice unix socket channel initialization enhancement Properly initialize channels in order to fix: - No audio - Need to give focus in order to copy/paste text from a spice window --- plugins/spice/spice_plugin.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'plugins') diff --git a/plugins/spice/spice_plugin.c b/plugins/spice/spice_plugin.c index 8e2807bf1..fea8a3eff 100644 --- a/plugins/spice/spice_plugin.c +++ b/plugins/spice/spice_plugin.c @@ -53,7 +53,7 @@ static void remmina_plugin_spice_agent_connected_event_cb(SpiceChannel *, Remmin static void remmina_plugin_spice_display_ready_cb(GObject *, GParamSpec *, RemminaProtocolWidget *); static void remmina_plugin_spice_update_scale_mode(RemminaProtocolWidget *); static void remmina_plugin_spice_session_open_fd(RemminaProtocolWidget *); -static void remmina_plugin_spice_channel_open_fd(RemminaProtocolWidget *, SpiceChannel *); +static void remmina_plugin_spice_channel_open_fd_cb(SpiceChannel *channel, gint tls G_GNUC_UNUSED, RemminaProtocolWidget *); void remmina_plugin_spice_select_usb_devices(RemminaProtocolWidget *); #ifdef SPICE_GTK_CHECK_VERSION @@ -94,7 +94,7 @@ remmina_plugin_spice_session_open_fd(RemminaProtocolWidget *gp) } static void -remmina_plugin_spice_channel_open_fd(RemminaProtocolWidget *gp, SpiceChannel *channel) +remmina_plugin_spice_channel_open_fd_cb(SpiceChannel *channel, gint tls, RemminaProtocolWidget *gp) { TRACE_CALL(__func__); RemminaPluginSpiceData *gpdata = GET_PLUGIN_DATA(gp); @@ -256,14 +256,8 @@ static void remmina_plugin_spice_channel_new_cb(SpiceSession *session, SpiceChan g_return_if_fail(gpdata != NULL); if(gpdata->isUnix) { - remmina_plugin_spice_channel_open_fd(gp, channel); + g_signal_connect(channel, "open-fd", G_CALLBACK(remmina_plugin_spice_channel_open_fd_cb), gp); } - /** - * g_signal_connect(channel, - * "open-fd", - * G_CALLBACK(remmina_plugin_spice_channel_open_fd), - * gp); - */ g_object_get(channel, "channel-id", &id, "channel-type", &type, NULL); REMMINA_PLUGIN_DEBUG ("New spice channel %p %s %d", channel, g_type_name(G_OBJECT_TYPE(channel)), id); -- cgit v1.2.3