summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center14
1 files changed, 5 insertions, 9 deletions
diff --git a/control-center b/control-center
index 7a032ec6..483c47d3 100755
--- a/control-center
+++ b/control-center
@@ -697,15 +697,11 @@ sub launch_xapp {
my $find_windows = sub { split '\n', `xwininfo -root -tree -int | grep '$name'` };
my @before = &$find_windows();
fork_("$exec; kill -USR1 $$");
- while (1) {
- my @after = &$find_windows();
- while (@after ne $xx + @before) {
- @after = &$find_windows();
- }
- my $c = top(difference2(\@after, \@before));
- $c =~ /\s*([0-9]*)\s*/;
- return $1;
- }
+ my @after = &$find_windows();
+ @after = &$find_windows() while @after ne $xx + @before;
+ my $c = top(difference2(\@after, \@before));
+ $c =~ /\s*([0-9]*)\s*/;
+ return $1;
}
sub hide_socket_and_clean {