Reusing formatting code IcccmWmStateFormatter.