summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center21
1 files changed, 9 insertions, 12 deletions
diff --git a/control-center b/control-center
index 44c6ce12..49847e7f 100755
--- a/control-center
+++ b/control-center
@@ -649,17 +649,15 @@ sub fork_ {
sub compute_exec_string {
my ($icon, $log_exp, $exec_, $gtkplug, undef, $alternate) = @_; #($_[0], @{$_[1]});
- my $exec = $exec_;
+ my $exec = ref($exec_) ? $exec_->[0] : $exec_;
$exec .= " --summary" if $expert_wizard && $exec_ =~ /drakwizard/;
- if ($embedded) {
- if ($gtkplug != -1) { # not explicitely not embedded
- $notebook_global->hide;
- create_hidden_socket_if_needed();
- $emb_box->show;
- $emb_socket->realize;
- $exec .= " --embedded " . $emb_socket->window->XWINDOW . " " . $$;
- }
+ if ($embedded && $gtkplug != -1) { # globally embedded and not "explicitely not embedded"
+ $notebook_global->hide;
+ create_hidden_socket_if_needed();
+ $emb_box->show;
+ $emb_socket->realize;
if ($gtkplug > 0) {
+ $exec .= " --embedded " . $emb_socket->window->XWINDOW . " " . $$;
$emb_wait->show;
undef $run_pixbuf if $run_pixbuf; #->unref;
$run_pixbuf = gtkcreate_pixbuf($icon . "_128");
@@ -669,12 +667,11 @@ sub compute_exec_string {
$left_locked = 1;
$pending_app = 1;
fork_($exec);
- } elsif ($gtkplug == -1) { # explicitely not embedded
- fork_($exec, 1);
} else { # gtkplug == 0
$emb_socket->show;
+ $exec_->[0] = $exec;
$SIG{CHLD} = undef;
- $emb_socket->steal(launch_xapp(@{$exec_}));
+ $emb_socket->steal(launch_xapp(@$exec_));
$SIG{CHLD} = \&sig_child;
}
} else { # not embedded