'http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2551529'

def get_wm_type(self):

    r = self.get_property('_NET_WM_WINDOW_TYPE', 'ATOM', unpack=int)
    if r:
        name = self.conn.atoms.get_name(r[0])
        return WindowTypes.get(name, name)
