예제 #1
0
class Main(object):
    def __init__(self):
        conn = xcb.connect(display=os.environ['DISPLAY'])
        self.wm = WindowManager(conn)
        self.cmd = CommandDispatcher(self.wm)
        self.evd = EventDispatcher(self.wm)

    def run(self):
        # TODO Replace with init dispatch
        self.wm.start_managing()

        # Main loop
        while True:
            self.evd.dispatch_events()

        self.conn.disconnect()
예제 #2
0
 def __init__(self):
     conn = xcb.connect(display=os.environ['DISPLAY'])
     self.wm = WindowManager(conn)
     self.cmd = CommandDispatcher(self.wm)
     self.evd = EventDispatcher(self.wm)