It seems many popular applications (Spotify, Chorome, urxvt) don't null
terminate WM_NAME. Check if the final byte of strings is null and adjust
the length accordingly.
This will affect properties like _NET_WM_DESKTOP_NAMES too which are
arrays of strings. In the one WM I looked at (QTile), it didn't
null-terminate the final element in the array either (i.e. it was
'desktop1\0desktop2\0desktop3'), so I think being more permissive about
what we accept is a good thing.
It seems many popular applications (Spotify, Chorome, urxvt) don't null terminate
WM_NAME
. Check if the final byte of strings is null and adjust the length accordingly.This will affect properties like
_NET_WM_DESKTOP_NAMES
too which are arrays of strings. In the one WM I looked at (QTile), it didn't null-terminate the final element in the array either (i.e. it was'desktop1\0desktop2\0desktop3'
), so I think being more permissive about what we accept is a good thing.