Pierre d'Herbemont pdherbemont@free.fr writes:
- Launch a 'carbon' thread which will run the carbon run loop (which
does not poll), and writes to a fd as soon as it receive events.
I think 2) may be preferred but to have a separate thread that watch event and an other that act on the UI tends to be tricky.
In any case you need to support multiple threads acting on the UI, so that shouldn't be much of an issue. Note that the event thread should be posting messages, not writing to an fd. It probably means that the design of many bits of the user code need to be different from x11drv, which is why I think it's important to get this right before writing tons of code.