repaint after notify_button() ?

Pekka Paalanen ppaalanen at
Mon Feb 17 09:40:59 UTC 2020

On Fri, 14 Feb 2020 17:25:49 +0000
Josh Simonot <JSimonot at> wrote:

> Aha!  That's the problem:  I call notify_*() from my own thread which
> reads a socket fd from a remote server.  Sounds like the correct way
> to do this is use wl_event_loop_add_fd() to register the socket, and
> read from the fd in the callback?



> I have some non-input messages that need to remain async from
> weston's event loop (ex. some setup during compositor start),  so I
> did a test by keeping the notify_*() event calls in my thread and
> then "dispatch" the event loop by sending a signal over a pipe which
> I registered with wl_event_loop_add_fd().  This appears to be
> working!  I just want to make sure there's no obvious
> problems/race-conditions that come to mind with calling notify_*()
> asynchronously?

Nothing in libweston is meant to be thread-safe, so I'm surprised it
didn't explode more spectacularly, but perhaps that is just a matter of

I very much recommend to not call any libwayland-server or libweston
functions or access any data used by them from another thread.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the wayland-devel mailing list