Fix case where xwininfo will detect wid even though it

it no longer exists (would prevent terminal from ever being created)
long-opts
angelic-sedition 10 years ago
parent c6eb03b37e
commit 1b5a0c002e

@ -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

Loading…
Cancel
Save