Example #1
0
events.register_callback(xproto.MappingNotifyEvent,
                         root.cb_MappingNotifyEvent, state.root)
events.register_callback(xproto.MapRequestEvent,
                         client.cb_MapRequestEvent, state.root)
events.register_callback(xproto.FocusInEvent,
                         client.cb_FocusInEvent, state.root)
events.register_callback(xproto.FocusOutEvent,
                         client.cb_FocusOutEvent, state.root)
events.register_callback(xproto.ConfigureRequestEvent,
                         window.cb_ConfigureRequestEvent, state.root)
events.register_callback(xproto.MotionNotifyEvent, grab.drag_do,
                         state.pyndow, None, None, None)
events.register_callback(xproto.ButtonReleaseEvent, grab.drag_end,
                         state.pyndow, None, None, None)

state.root_focus()

while True:
    event.read(state.conn, block=True)
    for e in event.queue():
        events.dispatch(e)

    events.run_latent()

    state.conn.flush()

    if state.die:
        break

misc.spawn('killall Xephyr')
Example #2
0
def quit():
    state.die = True
    misc.spawn('killall Xephyr')
Example #3
0
def quit():
    state.die = True
    misc.spawn('killall Xephyr')
Example #4
0
 def callback(e, cmd=cmd):
     misc.spawn(cmd[1:-1])