From 5cb4d8f0463c688eec1644ce05f6c6ca326a8574 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 13 May 2008 15:02:33 +0000 Subject: (switch) advise to log out if PA is enabled/disabled --- perl-install/harddrake/sound.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'perl-install/harddrake') diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index 63d2def3c..885e48d1f 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -323,6 +323,8 @@ sub switch { my $is_5_1_in_pulseaudio_enabled = is_5_1_in_pulseaudio_enabled(); my $is_user_switching = is_user_switching_enabled(); + my $old_value = $is_pulseaudio_enabled; + my $write_config = sub { set_pulseaudio($is_pulseaudio_enabled); set_pulseaudio_routing($is_pulseaudio_enabled && $is_pulseaudio_routing_enabled); @@ -332,6 +334,10 @@ sub switch { $in->do_pkgs->ensure_is_installed('alsa-plugins-pulseaudio', '/usr/' . (arch() =~ /x86_64/ ? 'lib64' : 'lib') .'/alsa-lib/libasound_module_pcm_pulse.so'); } + if ($old_value ne $is_pulseaudio_enabled) { + require any; + any::ask_for_X_restart($in); + } }; my @common = ( -- cgit v1.2.1