<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>Recently, some users of compton[1] has noticed a bug, where the contents of windows will freeze while there are indeed updates happening (e.g. when viewing a video, the video will freeze while the sound is still playing). For more background, please see[2].</div><div><br></div><div>So I tried to look into this problem. Internally, compton uses the damage event to track if the screen needs updating. Essentially, when a new window is created, XDamageCreate is called to get damage events (DamageReportNonEmpty), then compton sits in a select() loop, and process damage events accordingly. Every time a damage notify is received, DamageSubtract is called to clear the damage, and the screen is repainted.</div><div><br></div><div>The problem is, some time, the select() will just not return, even when contents of some windows are clearly been updated. Usually if some other event happens when this is going on, select() will return, and XNextEvent() will return the other event, and the damage notify event. So looks like the damage event is not lost, and is probably just stuck in some queue somewhere.</div><div><br></div><div>Also, this problem seems to be heavily timing dependent. I haven't been able to reproduce this problem when running compton under strace.</div><div><br></div><div>Right now I'm working around this problem by using DamageReportRawRectangles, which seems to work.</div><div><br></div><div>If you have any idea where the problem could be, please help.</div><div><br></div><div>Thanks.</div><div><br></div><div>[1]: <a href="https://github.com/chjj/compton">https://github.com/chjj/compton</a></div><div>[2]: <a href="https://github.com/chjj/compton/issues/494">https://github.com/chjj/compton/issues/494</a><br></div><div><br>-- <br><div dir="ltr" class="gmail_signature"><br>Regards<br>Yuxuan Shui</div></div></div></div></div>