Hacker News new | ask | show | jobs
by asveikau 724 days ago
> Basically when a window is created, we receive an event. After getting that event, we lock the X server, then ask it about the new window. And sometimes, the window is just not there

Relying on this sounds like a race condition even if the lock is working. In the time between you process the event and getting the lock, the window could have been destroyed.

1 comments

I don't know if it is sufficient to prevent the race, but the article does mention that they check for DestroyNotify events after the grab.
Ooh, that sounds good. I must have missed that part.