Felix Palmen :freebsd: :c64: on Nostr: Adventures in #X11 programming with #xcb: xcb's async model and reading/caching of ...
Adventures in #X11 programming with #xcb:
xcb's async model and reading/caching of replies and events driving me crazy 🤯
It's rare, but sometimes it's possible that reads are triggered by seemingly(!) unrelated xcb functions (I guess xcb_generate_id() might be one of them). Workaround: Always ask xcb how many bytes it *did* read before ever blocking on select() 🤪
https://github.com/Zirias/xmoji/commit/8bfd3075a74cc61dfce1c086204d3ba491945abb
xcb's async model and reading/caching of replies and events driving me crazy 🤯
It's rare, but sometimes it's possible that reads are triggered by seemingly(!) unrelated xcb functions (I guess xcb_generate_id() might be one of them). Workaround: Always ask xcb how many bytes it *did* read before ever blocking on select() 🤪
https://github.com/Zirias/xmoji/commit/8bfd3075a74cc61dfce1c086204d3ba491945abb