xwininfo parsing function