Пример #1
0
    def __new__(cls, parent, client):
        self = _PopupWindow.__new__(cls)

        mask = xcb.xproto.CW.BackPixel
        values = [c_bg]
        self.id = window.create(parent.inner.id, mask, values)

        self.parent = parent
        self.client = client

        return self
Пример #2
0
    def __new__(cls):
        self = _PopupWindow.__new__(cls)

        mask = xcb.xproto.CW.BackPixel | xcb.xproto.CW.EventMask
        values = [c_brdr_clr]
        values.append(xcb.xproto.EventMask.SubstructureRedirect |
                      xcb.xproto.EventMask.ButtonPress |
                      xcb.xproto.EventMask.ButtonRelease)

        self.id = window.create(state.root, mask, values)

        return self