def __init__(self, wid): GeometryWindow.__init__(self, wid) self._properties = core.ListProperties(self.id) self._protocols = icccm.get_wm_protocols(conn, self.id) self._hints = icccm.get_wm_hints(conn, self.id) self._normal_hints = icccm.get_wm_normal_hints(conn, self.id) self._class = icccm.get_wm_class(conn, self.id) self._motif = motif.get_hints(conn, self.id) self._wmname = ewmh.get_wm_name(conn, self.id) self._wmclass = icccm.get_wm_class(conn, self.id)
def cb_PropertyNotifyEvent(self, e): """ Respond to any added, changed or deleted properties on the client. """ if not self.is_alive(): return if (e.state == xcb.xproto.Property.NewValue and e.atom not in self.win.properties): self.win.properties.append(e.atom) a = aname(e.atom) if a in ('_NET_WM_NAME', 'WM_NAME'): self.update_title(a) elif a == 'WM_NORMAL_HINTS': self.win.normal_hints = icccm.get_wm_normal_hints( state.conn, self.win.id) elif a in ('_NET_WM_STRUT', '_NET_WM_STRUT_PARTIAL'): self.update_struts() if (e.state == xcb.xproto.Property.Delete and e.atom in self.win.properties): self.win.properties.remove(e.atom)