From 1b5a0c002edfd17610837ea3870bfb81e2736cc1 Mon Sep 17 00:00:00 2001 From: angelic-sedition Date: Sat, 16 May 2015 00:22:24 -0400 Subject: [PATCH] Fix case where xwininfo will detect wid even though it it no longer exists (would prevent terminal from ever being created) --- tdrop | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tdrop b/tdrop index d92141b..b26780e 100755 --- a/tdrop +++ b/tdrop @@ -288,7 +288,8 @@ wid_toggle() { exists=true if [[ -n $wid ]]; then visibility=$(xwininfo -id "$wid" | awk '/Map State/ {print $3}') - if [[ -z $visibility ]]; then + # sometimes xwininfo will still report a window as existing hence xprop check + if [[ -z $visibility ]] || [[ -z $(xprop -id "$wid") ]]; then # window no longer exists exists=false fi