From 8cad7fb8eb1d16da7fb9560b5a2aa8e10b9d0619 Mon Sep 17 00:00:00 2001 From: noctuid Date: Wed, 23 Mar 2016 12:35:42 -0400 Subject: [PATCH] Don't output xprop error messages Ignore errors when checking for visibility. Addresses #14. --- tdrop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrop b/tdrop index 84031c1..7de4979 100755 --- a/tdrop +++ b/tdrop @@ -521,7 +521,7 @@ wid_toggle() { if [[ -n $wid ]]; then visibility=$(get_visibility "$wid") # sometimes xwininfo will still report a window as existing hence xprop check - if [[ -z $visibility ]] || [[ -z $(xprop -id "$wid") ]]; then + if [[ -z $visibility ]] || [[ -z $(xprop -id "$wid" 2> /dev/null) ]]; then # window no longer exists exists=false > /tmp/tdrop/"$program$num"