diff options
-rwxr-xr-x | control-center | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/control-center b/control-center index 39d523d8..e5f34ecf 100755 --- a/control-center +++ b/control-center @@ -299,8 +299,15 @@ my ($menu, $factory) = create_factory_menu($window_global, { path => N("/_Themes") . "/" . ($name eq $theme ? " O " : " ") . "_$_", callback => sub { return if $theme eq $name; - !$pending_app || splash_warning(N("This action will restart the control center.\nAny change not applied will be lost."), 1) and sig_usr1(), exec "$0 --theme $name"; - } }; + !$pending_app || splash_warning(N("This action will restart the control center.\nAny change not applied will be lost."), 1) and do { + # embedded app must be killed + kill_children(); + kill_logdrake(); + sig_usr1(); + exec "$0 --theme $name"; + }; + } + } } grep { -d "$themes_dir/$_" } all($themes_dir)), { path => N("/_Themes").N("/_More themes"), callback => \&more_themes } ), @@ -743,9 +750,13 @@ sub kill_children { @pid_launched = (); } +sub kill_logdrake { + map { if__($_, kill 'TERM', $_) } @pid_exp; +} + sub quit_global { &kill_children(); - map { if__($_, kill 'TERM', $_) } @pid_exp; + &kill_logdrake(); setVarsInSh($conffile, { EMBEDDED => bool2text($embedded), LOGS => bool2text($show_logs), |