'A wrapper for the event loop\'s call_soon which also flushes the X
event queue to the server after func is called.'

def call_soon(self, func, *args):

    def f():
        func(*args)
        self.conn.flush()
    return self._eventloop.call_soon(f)
