chiark / gitweb /
bin/wakey.sh: Treat a zero `active window' as being some foreign thing.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 26 May 2020 15:29:17 +0000 (16:29 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 26 May 2020 15:29:17 +0000 (16:29 +0100)
`xpra' reports a window outside of its session as having id `0'  But
`xwininfo' treats this as a request to choose a window interactively,
which is not what we want.

bin/wakey.sh

index bab1cdf160357ff39da96bee52d4b8746a58e181..dc46b18db3bde8095f2c2f22c99c6a83c1c596db 100644 (file)
@@ -34,6 +34,8 @@ __wakey_precmd () {
            win=$(xprop -root _NET_ACTIVE_WINDOW | sed 's/^.*[#=] //')
            if [[ $win = *"not found." ]] || (( win == WINDOWID )); then
              suppress=t
+           elif (( win == 0 )); then
+             :
            else
              for i in $(xwininfo -tree -id $win 2>/dev/null |
                              sed -n '/^ *[0-9]\+ child\(ren\)\?[.:]$/,$ {