From 56a250a314e004cb2ef65a39a9fb7e2138fa4fc1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 01:28:34 +0000 Subject: [PATCH 1/5] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- spice-gtk.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spice-gtk.spec b/spice-gtk.spec index b6ca792..6e2e153 100644 --- a/spice-gtk.spec +++ b/spice-gtk.spec @@ -2,7 +2,7 @@ Name: spice-gtk Version: 0.29 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A GTK+ widget for SPICE clients Group: System Environment/Libraries @@ -253,6 +253,9 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc %{_bindir}/spicy-stats %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 0.29-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Jun 15 2015 Marc-Andre Lureau 0.29-1 - Update to spice-gtk v0.29 From 9842f7b0ab238426aadb94378459a79ad6235adb Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Fri, 19 Jun 2015 18:18:09 +0200 Subject: [PATCH 2/5] Remove obsolete patches --- ...-Do-not-stop-event-listening-if-Spic.patch | 31 -------------- ...w-handler-to-be-after-default-handle.patch | 39 ------------------ ...handler-to-be-after-default-handlers.patch | 40 ------------------- 3 files changed, 110 deletions(-) delete mode 100644 0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch delete mode 100644 0002-audio-channel-new-handler-to-be-after-default-handle.patch delete mode 100644 0003-usb-channel-new-handler-to-be-after-default-handlers.patch diff --git a/0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch b/0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch deleted file mode 100644 index dfd326e..0000000 --- a/0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch +++ /dev/null @@ -1,31 +0,0 @@ -From e3932bfebbfec7637f3d03d90e8f9b75e3223236 Mon Sep 17 00:00:00 2001 -From: Pavel Grunt -Date: Wed, 11 Mar 2015 16:31:39 +0100 -Subject: [spice-gtk] channel-usbredir: Do not stop event listening if - SpiceSession does not exist - -Avoids Segfault when closing the connection just after the usb device redirection. ---- - gtk/channel-usbredir.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c -index b1a91fb..d974434 100644 ---- a/gtk/channel-usbredir.c -+++ b/gtk/channel-usbredir.c -@@ -419,9 +419,12 @@ void spice_usbredir_channel_disconnect_device(SpiceUsbredirChannel *channel) - * usbredirhost_set_device NULL will interrupt the - * libusb_handle_events call in the thread. - */ -- spice_usb_device_manager_stop_event_listening( -- spice_usb_device_manager_get( -- spice_channel_get_session(SPICE_CHANNEL(channel)), NULL)); -+ { -+ SpiceSession *session = spice_channel_get_session(SPICE_CHANNEL(channel)); -+ if (session != NULL) -+ spice_usb_device_manager_stop_event_listening( -+ spice_usb_device_manager_get(session, NULL)); -+ } - /* This also closes the libusb handle we passed from open_device */ - usbredirhost_set_device(priv->host, NULL); - libusb_unref_device(priv->device); diff --git a/0002-audio-channel-new-handler-to-be-after-default-handle.patch b/0002-audio-channel-new-handler-to-be-after-default-handle.patch deleted file mode 100644 index efef9c3..0000000 --- a/0002-audio-channel-new-handler-to-be-after-default-handle.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 81d8175d9d6a8297b10cead6c951bf560f61be4c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Tue, 28 Apr 2015 14:30:28 +0200 -Subject: [PATCH spice-gtk] audio: channel-new handler to be after default - handlers - -Client usually connect to channel-new to connect their -handlers, such as open-fd. - -The audio channel-new handler will call channel_connect() on audio -channels, which may call open-fd. - -However, open-fd can be emitted before the client had a chance to -connect their handlers (from the channel-new callback). - -Connecting after the default handler solves this case. - -Fixes: -https://bugzilla.gnome.org/show_bug.cgi?id=747649 ---- - gtk/spice-audio.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gtk/spice-audio.c b/gtk/spice-audio.c -index 7784c8b..ce191e1 100644 ---- a/gtk/spice-audio.c -+++ b/gtk/spice-audio.c -@@ -267,7 +267,7 @@ SpiceAudio *spice_audio_new(SpiceSession *session, GMainContext *context, - return NULL; - - spice_g_signal_connect_object(session, "notify::enable-audio", G_CALLBACK(session_enable_audio), self, 0); -- spice_g_signal_connect_object(session, "channel-new", G_CALLBACK(channel_new), self, 0); -+ spice_g_signal_connect_object(session, "channel-new", G_CALLBACK(channel_new), self, G_CONNECT_AFTER); - update_audio_channels(self, session); - - return self; --- -2.1.0 - diff --git a/0003-usb-channel-new-handler-to-be-after-default-handlers.patch b/0003-usb-channel-new-handler-to-be-after-default-handlers.patch deleted file mode 100644 index d787cbf..0000000 --- a/0003-usb-channel-new-handler-to-be-after-default-handlers.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 9546b571d7143e4c9efcb022d6016ea1c9ed2536 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Tue, 28 Apr 2015 14:30:28 +0200 -Subject: [PATCH spice-gtk] usb: channel-new handler to be after default - handlers - -Client usually connect to channel-new to connect their -handlers, such as open-fd. - -The usbmanager channel-new handler will call channel_connect() on usbredir -channels, which may call open-fd. - -However, open-fd can be emitted before the client had a chance to -connect their handlers (from the channel-new callback). - -Connecting after the default handler solves this case. - -Fixes: -https://bugzilla.gnome.org/show_bug.cgi?id=748665 ---- - gtk/usb-device-manager.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c -index e11eae0..7aa60c4 100644 ---- a/gtk/usb-device-manager.c -+++ b/gtk/usb-device-manager.c -@@ -310,8 +310,7 @@ static gboolean spice_usb_device_manager_initable_init(GInitable *initable, - #endif - - /* Start listening for usb channels connect/disconnect */ -- g_signal_connect(priv->session, "channel-new", -- G_CALLBACK(channel_new), self); -+ spice_g_signal_connect_object(priv->session, "channel-new", G_CALLBACK(channel_new), self, G_CONNECT_AFTER); - g_signal_connect(priv->session, "channel-destroy", - G_CALLBACK(channel_destroy), self); - list = spice_session_get_channels(priv->session); --- -2.1.0 - From be27d29e9f7265631f608e2c21c50fd5730a1210 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 8 Sep 2015 14:37:38 +0200 Subject: [PATCH 3/5] Don't crash on volume sync when there is no audio channel Resolves: rhbz#1257210 --- ...dio-Do-not-volume-sync-without-audio.patch | 77 +++++++++++++++++++ spice-gtk.spec | 9 ++- 2 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 0001-audio-Do-not-volume-sync-without-audio.patch diff --git a/0001-audio-Do-not-volume-sync-without-audio.patch b/0001-audio-Do-not-volume-sync-without-audio.patch new file mode 100644 index 0000000..7a0dd1c --- /dev/null +++ b/0001-audio-Do-not-volume-sync-without-audio.patch @@ -0,0 +1,77 @@ +From a99ed1524b075c0cd9e7d82e7877783a1e31d291 Mon Sep 17 00:00:00 2001 +From: Victor Toso +Date: Mon, 7 Sep 2015 10:17:34 +0200 +Subject: [spice-gtk] audio: Do not volume-sync without audio + +In case audio backend is not initialized correctly or there isn't audio +in the VM, we should not try to volume-sync. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1257210 +--- + src/channel-main.c | 6 ++++-- + src/spice-audio.c | 4 ++++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/channel-main.c b/src/channel-main.c +index f5115aa..145b081 100644 +--- a/src/channel-main.c ++++ b/src/channel-main.c +@@ -1159,7 +1159,8 @@ static void agent_sync_audio_playback(SpiceMainChannel *main_channel) + SpiceAudio *audio = spice_audio_get(session, NULL); + SpiceMainChannelPrivate *c = main_channel->priv; + +- if (!test_agent_cap(main_channel, VD_AGENT_CAP_AUDIO_VOLUME_SYNC) || ++ if (audio == NULL || ++ !test_agent_cap(main_channel, VD_AGENT_CAP_AUDIO_VOLUME_SYNC) || + c->agent_volume_playback_sync == TRUE) { + SPICE_DEBUG("%s - is not going to sync audio with guest", __func__); + return; +@@ -1215,7 +1216,8 @@ static void agent_sync_audio_record(SpiceMainChannel *main_channel) + SpiceAudio *audio = spice_audio_get(session, NULL); + SpiceMainChannelPrivate *c = main_channel->priv; + +- if (!test_agent_cap(main_channel, VD_AGENT_CAP_AUDIO_VOLUME_SYNC) || ++ if (audio == NULL || ++ !test_agent_cap(main_channel, VD_AGENT_CAP_AUDIO_VOLUME_SYNC) || + c->agent_volume_record_sync == TRUE) { + SPICE_DEBUG("%s - is not going to sync audio with guest", __func__); + return; +diff --git a/src/spice-audio.c b/src/spice-audio.c +index ce191e1..3114a0a 100644 +--- a/src/spice-audio.c ++++ b/src/spice-audio.c +@@ -197,6 +197,7 @@ void spice_audio_get_playback_volume_info_async(SpiceAudio *audio, + GAsyncReadyCallback callback, + gpointer user_data) + { ++ g_return_if_fail(audio != NULL); + SPICE_AUDIO_GET_CLASS(audio)->get_playback_volume_info_async(audio, + cancellable, main_channel, callback, user_data); + } +@@ -208,6 +209,7 @@ gboolean spice_audio_get_playback_volume_info_finish(SpiceAudio *audio, + guint16 **volume, + GError **error) + { ++ g_return_val_if_fail(audio != NULL, FALSE); + return SPICE_AUDIO_GET_CLASS(audio)->get_playback_volume_info_finish(audio, + res, mute, nchannels, volume, error); + } +@@ -218,6 +220,7 @@ void spice_audio_get_record_volume_info_async(SpiceAudio *audio, + GAsyncReadyCallback callback, + gpointer user_data) + { ++ g_return_if_fail(audio != NULL); + SPICE_AUDIO_GET_CLASS(audio)->get_record_volume_info_async(audio, + cancellable, main_channel, callback, user_data); + } +@@ -229,6 +232,7 @@ gboolean spice_audio_get_record_volume_info_finish(SpiceAudio *audio, + guint16 **volume, + GError **error) + { ++ g_return_val_if_fail(audio != NULL, FALSE); + return SPICE_AUDIO_GET_CLASS(audio)->get_record_volume_info_finish(audio, + res, mute, nchannels, volume, error); + } +-- +2.4.3 + diff --git a/spice-gtk.spec b/spice-gtk.spec index 6e2e153..44b623f 100644 --- a/spice-gtk.spec +++ b/spice-gtk.spec @@ -2,7 +2,7 @@ Name: spice-gtk Version: 0.29 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A GTK+ widget for SPICE clients Group: System Environment/Libraries @@ -10,6 +10,7 @@ License: LGPLv2+ URL: http://spice-space.org/page/Spice-Gtk #VCS: git:git://anongit.freedesktop.org/spice/spice-gtk Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2 +Patch1: 0001-audio-Do-not-volume-sync-without-audio.patch BuildRequires: intltool BuildRequires: gtk2-devel >= 2.14 @@ -134,7 +135,7 @@ if [ -n '%{?_version_suffix}' ]; then fi pushd spice-gtk-%{version} -#%patch1 -p1 +%patch1 -p1 find . -name '*.stamp' | xargs touch popd @@ -253,6 +254,10 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc %{_bindir}/spicy-stats %changelog +* Tue Sep 08 2015 Christophe Fergeau 0.29-3 +- Don't crash on volume sync when there is no audio channel + Resolves: rhbz#1257210 + * Fri Jun 19 2015 Fedora Release Engineering - 0.29-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 79b272058d6deb4ecf95d9b5d65ff1602fef1967 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 12 Sep 2015 12:22:43 -0400 Subject: [PATCH 4/5] Fix virt-manager default screen resolution and resolution across reboots Resolves: 1240721 --- ...fig-if-at-least-one-monitor-has-dime.patch | 66 +++++++++++++++++++ spice-gtk.spec | 10 ++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch diff --git a/0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch b/0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch new file mode 100644 index 0000000..601039d --- /dev/null +++ b/0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch @@ -0,0 +1,66 @@ +From 93792a366e8c3020fe735d1080aa2ce58a2d03fa Mon Sep 17 00:00:00 2001 +Message-Id: <93792a366e8c3020fe735d1080aa2ce58a2d03fa.1442072848.git.crobinso@redhat.com> +In-Reply-To: +References: +From: Pavel Grunt +Date: Fri, 10 Jul 2015 10:37:27 +0200 +Subject: [PATCH 2/2] Send monitor config if at least one monitor has + dimensions + +If a client (virt-manager, spicy) is not setting display dimensions +and the "resize-guest" property is disabled, spice-gtk sends a wrong +monitor config message where all the monitors have width = heigh = 0 +when the agent connects. This message can confuse the guest, in that +case the guest will change the resolution of its monitor. + +Regression since 28312b8d1e287a320851e8828825f2ca138d8b0b + +Resolves: +https://bugzilla.redhat.com/show_bug.cgi?id=1240721 +(cherry picked from commit 4b5e6ec2114e1250c81027ebeac9cfe8d059153f) +--- + src/channel-main.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/src/channel-main.c b/src/channel-main.c +index fbf7677..8a61379 100644 +--- a/src/channel-main.c ++++ b/src/channel-main.c +@@ -1411,6 +1411,22 @@ static void agent_clipboard_release(SpiceMainChannel *channel, guint selection) + agent_msg_queue(channel, VD_AGENT_CLIPBOARD_RELEASE, msgsize, msg); + } + ++static gboolean any_display_has_dimensions(SpiceMainChannel *channel) ++{ ++ SpiceMainChannelPrivate *c; ++ guint i; ++ ++ g_return_if_fail(SPICE_IS_MAIN_CHANNEL(channel)); ++ c = channel->priv; ++ ++ for (i = 0; i < MAX_DISPLAY; i++) { ++ if (c->display[i].width > 0 && c->display[i].height > 0) ++ return TRUE; ++ } ++ ++ return FALSE; ++} ++ + /* main context*/ + static gboolean timer_set_display(gpointer data) + { +@@ -1423,6 +1439,11 @@ static gboolean timer_set_display(gpointer data) + if (!c->agent_connected) + return FALSE; + ++ if (!any_display_has_dimensions(channel)) { ++ SPICE_DEBUG("Not sending monitors config, at least one monitor must have dimensions"); ++ return FALSE; ++ } ++ + session = spice_channel_get_session(SPICE_CHANNEL(channel)); + + /* ensure we have an explicit monitor configuration at least for +-- +2.5.0 + diff --git a/spice-gtk.spec b/spice-gtk.spec index 44b623f..7c651c9 100644 --- a/spice-gtk.spec +++ b/spice-gtk.spec @@ -2,7 +2,7 @@ Name: spice-gtk Version: 0.29 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A GTK+ widget for SPICE clients Group: System Environment/Libraries @@ -11,6 +11,9 @@ URL: http://spice-space.org/page/Spice-Gtk #VCS: git:git://anongit.freedesktop.org/spice/spice-gtk Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2 Patch1: 0001-audio-Do-not-volume-sync-without-audio.patch +# Fix virt-manager default screen resolution and resolution across reboots +# Resolves: 1240721 +Patch2: 0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch BuildRequires: intltool BuildRequires: gtk2-devel >= 2.14 @@ -136,6 +139,7 @@ fi pushd spice-gtk-%{version} %patch1 -p1 +%patch2 -p1 find . -name '*.stamp' | xargs touch popd @@ -254,6 +258,10 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc %{_bindir}/spicy-stats %changelog +* Sat Sep 12 2015 Cole Robinson 0.29-4 +- Fix virt-manager default screen resolution and resolution across reboots +- Resolves: rhbz#1240721 + * Tue Sep 08 2015 Christophe Fergeau 0.29-3 - Don't crash on volume sync when there is no audio channel Resolves: rhbz#1257210 From 6192addf4be1e047adc7854ac7314cd1551e7c69 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 6 Oct 2015 18:42:13 +0200 Subject: [PATCH 5/5] Update to new 0.30 upstream release --- ...dio-Do-not-volume-sync-without-audio.patch | 77 ------------------- ...fig-if-at-least-one-monitor-has-dime.patch | 66 ---------------- sources | 2 +- spice-gtk.spec | 13 ++-- 4 files changed, 6 insertions(+), 152 deletions(-) delete mode 100644 0001-audio-Do-not-volume-sync-without-audio.patch delete mode 100644 0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch diff --git a/0001-audio-Do-not-volume-sync-without-audio.patch b/0001-audio-Do-not-volume-sync-without-audio.patch deleted file mode 100644 index 7a0dd1c..0000000 --- a/0001-audio-Do-not-volume-sync-without-audio.patch +++ /dev/null @@ -1,77 +0,0 @@ -From a99ed1524b075c0cd9e7d82e7877783a1e31d291 Mon Sep 17 00:00:00 2001 -From: Victor Toso -Date: Mon, 7 Sep 2015 10:17:34 +0200 -Subject: [spice-gtk] audio: Do not volume-sync without audio - -In case audio backend is not initialized correctly or there isn't audio -in the VM, we should not try to volume-sync. - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1257210 ---- - src/channel-main.c | 6 ++++-- - src/spice-audio.c | 4 ++++ - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/channel-main.c b/src/channel-main.c -index f5115aa..145b081 100644 ---- a/src/channel-main.c -+++ b/src/channel-main.c -@@ -1159,7 +1159,8 @@ static void agent_sync_audio_playback(SpiceMainChannel *main_channel) - SpiceAudio *audio = spice_audio_get(session, NULL); - SpiceMainChannelPrivate *c = main_channel->priv; - -- if (!test_agent_cap(main_channel, VD_AGENT_CAP_AUDIO_VOLUME_SYNC) || -+ if (audio == NULL || -+ !test_agent_cap(main_channel, VD_AGENT_CAP_AUDIO_VOLUME_SYNC) || - c->agent_volume_playback_sync == TRUE) { - SPICE_DEBUG("%s - is not going to sync audio with guest", __func__); - return; -@@ -1215,7 +1216,8 @@ static void agent_sync_audio_record(SpiceMainChannel *main_channel) - SpiceAudio *audio = spice_audio_get(session, NULL); - SpiceMainChannelPrivate *c = main_channel->priv; - -- if (!test_agent_cap(main_channel, VD_AGENT_CAP_AUDIO_VOLUME_SYNC) || -+ if (audio == NULL || -+ !test_agent_cap(main_channel, VD_AGENT_CAP_AUDIO_VOLUME_SYNC) || - c->agent_volume_record_sync == TRUE) { - SPICE_DEBUG("%s - is not going to sync audio with guest", __func__); - return; -diff --git a/src/spice-audio.c b/src/spice-audio.c -index ce191e1..3114a0a 100644 ---- a/src/spice-audio.c -+++ b/src/spice-audio.c -@@ -197,6 +197,7 @@ void spice_audio_get_playback_volume_info_async(SpiceAudio *audio, - GAsyncReadyCallback callback, - gpointer user_data) - { -+ g_return_if_fail(audio != NULL); - SPICE_AUDIO_GET_CLASS(audio)->get_playback_volume_info_async(audio, - cancellable, main_channel, callback, user_data); - } -@@ -208,6 +209,7 @@ gboolean spice_audio_get_playback_volume_info_finish(SpiceAudio *audio, - guint16 **volume, - GError **error) - { -+ g_return_val_if_fail(audio != NULL, FALSE); - return SPICE_AUDIO_GET_CLASS(audio)->get_playback_volume_info_finish(audio, - res, mute, nchannels, volume, error); - } -@@ -218,6 +220,7 @@ void spice_audio_get_record_volume_info_async(SpiceAudio *audio, - GAsyncReadyCallback callback, - gpointer user_data) - { -+ g_return_if_fail(audio != NULL); - SPICE_AUDIO_GET_CLASS(audio)->get_record_volume_info_async(audio, - cancellable, main_channel, callback, user_data); - } -@@ -229,6 +232,7 @@ gboolean spice_audio_get_record_volume_info_finish(SpiceAudio *audio, - guint16 **volume, - GError **error) - { -+ g_return_val_if_fail(audio != NULL, FALSE); - return SPICE_AUDIO_GET_CLASS(audio)->get_record_volume_info_finish(audio, - res, mute, nchannels, volume, error); - } --- -2.4.3 - diff --git a/0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch b/0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch deleted file mode 100644 index 601039d..0000000 --- a/0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 93792a366e8c3020fe735d1080aa2ce58a2d03fa Mon Sep 17 00:00:00 2001 -Message-Id: <93792a366e8c3020fe735d1080aa2ce58a2d03fa.1442072848.git.crobinso@redhat.com> -In-Reply-To: -References: -From: Pavel Grunt -Date: Fri, 10 Jul 2015 10:37:27 +0200 -Subject: [PATCH 2/2] Send monitor config if at least one monitor has - dimensions - -If a client (virt-manager, spicy) is not setting display dimensions -and the "resize-guest" property is disabled, spice-gtk sends a wrong -monitor config message where all the monitors have width = heigh = 0 -when the agent connects. This message can confuse the guest, in that -case the guest will change the resolution of its monitor. - -Regression since 28312b8d1e287a320851e8828825f2ca138d8b0b - -Resolves: -https://bugzilla.redhat.com/show_bug.cgi?id=1240721 -(cherry picked from commit 4b5e6ec2114e1250c81027ebeac9cfe8d059153f) ---- - src/channel-main.c | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) - -diff --git a/src/channel-main.c b/src/channel-main.c -index fbf7677..8a61379 100644 ---- a/src/channel-main.c -+++ b/src/channel-main.c -@@ -1411,6 +1411,22 @@ static void agent_clipboard_release(SpiceMainChannel *channel, guint selection) - agent_msg_queue(channel, VD_AGENT_CLIPBOARD_RELEASE, msgsize, msg); - } - -+static gboolean any_display_has_dimensions(SpiceMainChannel *channel) -+{ -+ SpiceMainChannelPrivate *c; -+ guint i; -+ -+ g_return_if_fail(SPICE_IS_MAIN_CHANNEL(channel)); -+ c = channel->priv; -+ -+ for (i = 0; i < MAX_DISPLAY; i++) { -+ if (c->display[i].width > 0 && c->display[i].height > 0) -+ return TRUE; -+ } -+ -+ return FALSE; -+} -+ - /* main context*/ - static gboolean timer_set_display(gpointer data) - { -@@ -1423,6 +1439,11 @@ static gboolean timer_set_display(gpointer data) - if (!c->agent_connected) - return FALSE; - -+ if (!any_display_has_dimensions(channel)) { -+ SPICE_DEBUG("Not sending monitors config, at least one monitor must have dimensions"); -+ return FALSE; -+ } -+ - session = spice_channel_get_session(SPICE_CHANNEL(channel)); - - /* ensure we have an explicit monitor configuration at least for --- -2.5.0 - diff --git a/sources b/sources index 07ca983..520278e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f84b8fd6a5e926dce07ec5ebb5f0caf3 spice-gtk-0.29.tar.bz2 +723e0e9ce9d507ba5d6cd331a3a9b7fb spice-gtk-0.30.tar.bz2 diff --git a/spice-gtk.spec b/spice-gtk.spec index 7c651c9..d5e4f3e 100644 --- a/spice-gtk.spec +++ b/spice-gtk.spec @@ -1,8 +1,8 @@ #define _version_suffix Name: spice-gtk -Version: 0.29 -Release: 4%{?dist} +Version: 0.30 +Release: 1%{?dist} Summary: A GTK+ widget for SPICE clients Group: System Environment/Libraries @@ -10,10 +10,6 @@ License: LGPLv2+ URL: http://spice-space.org/page/Spice-Gtk #VCS: git:git://anongit.freedesktop.org/spice/spice-gtk Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2 -Patch1: 0001-audio-Do-not-volume-sync-without-audio.patch -# Fix virt-manager default screen resolution and resolution across reboots -# Resolves: 1240721 -Patch2: 0002-Send-monitor-config-if-at-least-one-monitor-has-dime.patch BuildRequires: intltool BuildRequires: gtk2-devel >= 2.14 @@ -138,8 +134,6 @@ if [ -n '%{?_version_suffix}' ]; then fi pushd spice-gtk-%{version} -%patch1 -p1 -%patch2 -p1 find . -name '*.stamp' | xargs touch popd @@ -258,6 +252,9 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc %{_bindir}/spicy-stats %changelog +* Tue Oct 06 2015 Christophe Fergeau 0.30-1 +- Update to new 0.30 upstream release + * Sat Sep 12 2015 Cole Robinson 0.29-4 - Fix virt-manager default screen resolution and resolution across reboots - Resolves: rhbz#1240721