diff options
author | Yves Duret <yduret@mandriva.com> | 2001-06-21 11:52:05 +0000 |
---|---|---|
committer | Yves Duret <yduret@mandriva.com> | 2001-06-21 11:52:05 +0000 |
commit | ab3db48ce5aff960b15bc5d5b00567837a611617 (patch) | |
tree | ffa48464ff533e9556f320d532b08fb7c972b795 | |
parent | 96d2d518c22843d5b42a32f880d6a00352340696 (diff) | |
download | control-center-ab3db48ce5aff960b15bc5d5b00567837a611617.tar control-center-ab3db48ce5aff960b15bc5d5b00567837a611617.tar.gz control-center-ab3db48ce5aff960b15bc5d5b00567837a611617.tar.bz2 control-center-ab3db48ce5aff960b15bc5d5b00567837a611617.tar.xz control-center-ab3db48ce5aff960b15bc5d5b00567837a611617.zip |
fist the sleep
we must live nude !!
-rwxr-xr-x | control-center | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/control-center b/control-center index 85326ab3..3dae0126 100755 --- a/control-center +++ b/control-center @@ -383,7 +383,7 @@ sub exec_treeitem { $tree_launched{$label}->[0]=$nb_pages; $notebook_global->set_page($nb_pages); $socket->realize; - $socket->steal(launch_wait("kups", "kups")); + $socket->steal(launch_wait("kups", "kups",3)); $notebook_global->show_all(); $notebook_global->set_page($nb_pages); return; @@ -456,7 +456,7 @@ sub exec_treeitem { } sub launch_wait { - my $exec, $grep = @_; + my $exec, $grep, $num = @_; print "{{ $exec }}\n"; my $b = "xwininfo -root -tree -int | grep '" . $grep . "'"; my @before = split ('\n', `$b`); @@ -466,10 +466,13 @@ sub launch_wait { } $pid_launched[$nb_pages] = $pid; $nb_pages++; - sleep(1); my $res = 0; while (!$res) { my @after = split ('\n', `$b`); + while (@after ne ($num+@before)) { + @after = split ('\n', `$b`); + } + my $i = 0; my $c; foreach (@after) { @@ -481,7 +484,6 @@ sub launch_wait { $res=$1; print "[" . $res . "]\n"; } - sleep(1); $res; } |