Fixes #818 icon redraw corruption due to dropped Expose events#1309
Fixes #818 icon redraw corruption due to dropped Expose events#1309JRRandall wants to merge 1 commit into
Conversation
Expose events were previously processed through a global weed/handle pipeline, which could coalesce or invalidate events accross different windows. This caused repaint events for one window to be dropped when another window generated Expose events.
|
Hi @JRRandall Thanks, but I don't think this is the correct thing to do. We used to use a similar approach, and the reason we rewrote it was because we had the opposite issue of missing Expose events. I've not had time (and won't have time) to look into this, but it's worthwhile going back tp look at the libx11 changes which ultimately introduced this issue and to work back from there. But I don't think this change is the correct one. |
|
@ThomasAdam Thanks for taking the time to review this, I really appreciate the feedback and the context around the thread-safety changes in libX11. It sounds like maybe it changed more than just timing... While continuing to debug this, I tried temporarily bypassing Expose weeding entirely as an experiment, and that consistently resolved the repaint issue. That seems to suggest the problem is tied specifically to how Expose events are being coalesced rather than the broader event handling. I’m going to take another pass at this with that in mind and see if I can come up with a more targeted fix that preserves the intended behavior. |
What does this PR do?
Fixes an issue where icon windows could fail to repaint when overlapping or adjacent icons changed state (e.g., de-iconifying with long titles).
Expose events were previously processed through a global weed/handle pipeline, which could coalesce or invalidate events across different windows. This caused repaint events for one window to be dropped when another window generated Expose events.
This PR replaces the global handling with per-window processing by iterating over queued Expose events and coalescing them only within the same window using flush_accumulate_expose().
This preserves event coalescing while restoring correct per-window repaint behavior.
Issue number(s)