diff -Nru gnome-control-center-3.38.5/debian/changelog gnome-control-center-3.38.5/debian/changelog --- gnome-control-center-3.38.5/debian/changelog 2021-03-23 15:54:54.000000000 +0800 +++ gnome-control-center-3.38.5/debian/changelog 2021-08-03 16:40:06.000000000 +0800 @@ -1,3 +1,11 @@ +gnome-control-center (1:3.38.5-1ubuntu2) hirsute; urgency=medium + + * d/p/0033-Fix-volume-adjustment-failure-on-volume-slider.patch + Can't adjust the output volume via volume-slider after changing + the current output-device. (LP: #1938747) + + -- Hui Wang Tue, 03 Aug 2021 16:40:06 +0800 + gnome-control-center (1:3.38.5-1ubuntu1) hirsute; urgency=medium * New bugfix update based on Debian diff -Nru gnome-control-center-3.38.5/debian/patches/0033-Fix-volume-adjustment-failure-on-volume-slider.patch gnome-control-center-3.38.5/debian/patches/0033-Fix-volume-adjustment-failure-on-volume-slider.patch --- gnome-control-center-3.38.5/debian/patches/0033-Fix-volume-adjustment-failure-on-volume-slider.patch 1970-01-01 08:00:00.000000000 +0800 +++ gnome-control-center-3.38.5/debian/patches/0033-Fix-volume-adjustment-failure-on-volume-slider.patch 2021-08-03 16:38:21.000000000 +0800 @@ -0,0 +1,138 @@ +Index: gnome-control-center-40.0/panels/sound/cc-sound-panel.c +=================================================================== +--- gnome-control-center-40.0.orig/panels/sound/cc-sound-panel.c ++++ gnome-control-center-40.0/panels/sound/cc-sound-panel.c +@@ -96,18 +96,12 @@ allow_amplified_changed_cb (CcSoundPanel + } + + static void +-output_device_changed_cb (CcSoundPanel *self) ++set_output_stream (CcSoundPanel *self, ++ GvcMixerStream *stream) + { +- GvcMixerUIDevice *device; +- GvcMixerStream *stream = NULL; + GvcChannelMap *map = NULL; + gboolean can_fade = FALSE, has_lfe = FALSE; + +- device = cc_device_combo_box_get_device (self->output_device_combo_box); +- +- if (device != NULL) +- stream = gvc_mixer_control_get_stream_from_device (self->mixer_control, device); +- + cc_volume_slider_set_stream (self->output_volume_slider, stream, CC_STREAM_TYPE_OUTPUT); + cc_volume_slider_set_stream (self->output_volume_slider_ubuntu, stream, CC_STREAM_TYPE_OUTPUT); + cc_level_bar_set_stream (self->output_level_bar, stream, CC_STREAM_TYPE_OUTPUT); +@@ -124,12 +118,34 @@ output_device_changed_cb (CcSoundPanel * + + gtk_widget_set_visible (GTK_WIDGET (self->fade_row), can_fade); + gtk_widget_set_visible (GTK_WIDGET (self->subwoofer_row), has_lfe); ++} ++ ++static void ++output_device_changed_cb (CcSoundPanel *self) ++{ ++ GvcMixerUIDevice *device; ++ GvcMixerStream *stream = NULL; ++ ++ device = cc_device_combo_box_get_device (self->output_device_combo_box); ++ ++ if (device != NULL) ++ stream = gvc_mixer_control_get_stream_from_device (self->mixer_control, device); ++ ++ set_output_stream (self, stream); + + if (device != NULL) + gvc_mixer_control_change_output (self->mixer_control, device); + } + + static void ++set_input_stream (CcSoundPanel *self, ++ GvcMixerStream *stream) ++{ ++ cc_volume_slider_set_stream (self->input_volume_slider, stream, CC_STREAM_TYPE_INPUT); ++ cc_level_bar_set_stream (self->input_level_bar, stream, CC_STREAM_TYPE_INPUT); ++} ++ ++static void + input_device_changed_cb (CcSoundPanel *self) + { + GvcMixerUIDevice *device; +@@ -140,8 +156,7 @@ input_device_changed_cb (CcSoundPanel *s + if (device != NULL) + stream = gvc_mixer_control_get_stream_from_device (self->mixer_control, device); + +- cc_volume_slider_set_stream (self->input_volume_slider, stream, CC_STREAM_TYPE_INPUT); +- cc_level_bar_set_stream (self->input_level_bar, stream, CC_STREAM_TYPE_INPUT); ++ set_input_stream (self, stream); + + if (device != NULL) + gvc_mixer_control_change_input (self->mixer_control, device); +@@ -153,12 +168,18 @@ output_device_update_cb (CcSoundPanel *s + { + GvcMixerUIDevice *device; + gboolean has_multi_profiles; ++ GvcMixerStream *stream = NULL; + + device = cc_device_combo_box_get_device (self->output_device_combo_box); + cc_profile_combo_box_set_device (self->output_profile_combo_box, self->mixer_control, device); + has_multi_profiles = (cc_profile_combo_box_get_profile_count (self->output_profile_combo_box) > 1); + gtk_widget_set_visible (GTK_WIDGET (self->output_profile_row), + has_multi_profiles); ++ ++ if (cc_volume_slider_get_stream (self->output_volume_slider) == NULL) ++ stream = gvc_mixer_control_get_stream_from_device (self->mixer_control, device); ++ if (stream != NULL) ++ set_output_stream (self, stream); + } + + static void +@@ -167,12 +188,18 @@ input_device_update_cb (CcSoundPanel *se + { + GvcMixerUIDevice *device; + gboolean has_multi_profiles; ++ GvcMixerStream *stream = NULL; + + device = cc_device_combo_box_get_device (self->input_device_combo_box); + cc_profile_combo_box_set_device (self->input_profile_combo_box, self->mixer_control, device); + has_multi_profiles = (cc_profile_combo_box_get_profile_count (self->input_profile_combo_box) > 1); + gtk_widget_set_visible (GTK_WIDGET (self->input_profile_row), + has_multi_profiles); ++ ++ if (cc_volume_slider_get_stream (self->input_volume_slider) == NULL) ++ stream = gvc_mixer_control_get_stream_from_device (self->mixer_control, device); ++ if (stream != NULL) ++ set_input_stream (self, stream); + } + + static void +Index: gnome-control-center-40.0/panels/sound/cc-volume-slider.c +=================================================================== +--- gnome-control-center-40.0.orig/panels/sound/cc-volume-slider.c ++++ gnome-control-center-40.0/panels/sound/cc-volume-slider.c +@@ -247,6 +247,14 @@ cc_volume_slider_set_stream (CcVolumeSli + } + } + ++GvcMixerStream * ++cc_volume_slider_get_stream (CcVolumeSlider *self) ++{ ++ g_return_val_if_fail (CC_IS_VOLUME_SLIDER (self), NULL); ++ ++ return self->stream; ++} ++ + void + cc_volume_slider_set_is_amplified (CcVolumeSlider *self, + gboolean is_amplified) +Index: gnome-control-center-40.0/panels/sound/cc-volume-slider.h +=================================================================== +--- gnome-control-center-40.0.orig/panels/sound/cc-volume-slider.h ++++ gnome-control-center-40.0/panels/sound/cc-volume-slider.h +@@ -40,4 +40,6 @@ void cc_volume_slider_set_stream + void cc_volume_slider_set_is_amplified (CcVolumeSlider *slider, + gboolean is_amplified); + ++GvcMixerStream *cc_volume_slider_get_stream (CcVolumeSlider *slider); ++ + G_END_DECLS diff -Nru gnome-control-center-3.38.5/debian/patches/series gnome-control-center-3.38.5/debian/patches/series --- gnome-control-center-3.38.5/debian/patches/series 2021-03-23 15:54:54.000000000 +0800 +++ gnome-control-center-3.38.5/debian/patches/series 2021-08-03 16:38:56.000000000 +0800 @@ -32,3 +32,4 @@ 0027-window-Stop-using-HdyLeaflet.patch 0030-temporarily-revert-alt-char-key.patch 0032-online-accounts-maybe-leak-a-reference-to-the-panel.patch +0033-Fix-volume-adjustment-failure-on-volume-slider.patch