minor settrans changes

This commit is contained in:
Christopher Jeffrey 2012-05-27 19:21:14 -05:00
parent d52f7a06db
commit 84b7c3e65d
1 changed files with 6 additions and 5 deletions

View File

@ -16,7 +16,7 @@
# settrans -c -o +5 # settrans -c -o +5
if test -z "$(which xprop)" -o -z "$(which xwininfo)"; then if test -z "$(which xprop)" -o -z "$(which xwininfo)"; then
echo "Please install x11-utils/xorg-xprop/xorg-xwininfo." >&2 echo "Please install x11-utils/xorg-xprop/xorg-xwininfo." >& 2
exit 1 exit 1
fi fi
@ -26,6 +26,7 @@ cur=
root= root=
parent= parent=
active= active=
i=
while getopts "scn:w:o:" option; do while getopts "scn:w:o:" option; do
case "$option" in case "$option" in
@ -52,7 +53,7 @@ while true; do
| grep Parent \ | grep Parent \
| sed 's/^.*\(0x\S*\).*$/\1/') | sed 's/^.*\(0x\S*\).*$/\1/')
if [ "$parent" = "$root" ]; then if test "$parent" = "$root"; then
break break
fi fi
@ -61,9 +62,9 @@ while true; do
i=$((i+1)) i=$((i+1))
if test $i -ge 1000; then if test $i -ge 1000; then
echo "An error occurred while traversing up the window tree." >&2 echo "An error occurred while traversing up the window tree." >& 2
echo "Please report this to https://github.com/chjj/compton/issues." >&2 echo "Please report this to https://github.com/chjj/compton/issues." >& 2
echo "Please mention your WM and versions of xwininfo/xprop." >&2 echo "Please mention your WM and versions of xwininfo/xprop." >& 2
exit 1 exit 1
fi fi
done done