'Tries to retrieve a canonical window name.
We test the following properties in order of preference:
- _NET_WM_VISIBLE_NAME
- _NET_WM_NAME
- WM_NAME.'

def get_name(self):

    r = self.get_property('_NET_WM_VISIBLE_NAME', 'UTF8_STRING')
    if r:
        return self._propertyUTF8(r)
    r = self.get_property('_NET_WM_NAME', 'UTF8_STRING')
    if r:
        return self._propertyUTF8(r)
    r = self.get_property(xcffib.xproto.Atom.WM_NAME, 'UTF8_STRING')
    if r:
        return self._propertyUTF8(r)
    r = self.get_property(xcffib.xproto.Atom.WM_NAME, xcffib.xproto.GetPropertyType.Any)
    if r:
        return self._propertyString(r)
