]> git.draconx.ca Git - rrace.git/commit
x11: Fix redraw on window resize.
authorNick Bowler <nbowler@draconx.ca>
Sun, 27 Nov 2022 16:43:01 +0000 (11:43 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 27 Nov 2022 17:25:21 +0000 (12:25 -0500)
commit31d8eda9987703c64fc63f4ddb4088cf3be5b7cc
tree402b005667cfd729ea03443c2b8b438f7514dec8
parent8c3800ae893db65b44c5b82384e6e7d3750ddb55
x11: Fix redraw on window resize.

It turns out that relying on expose events to trigger redraw of certain
tiles when enlarging is not actually a good idea.  No expose events will
be generated if the new portion of the window is obscured while resizing,
which means tiles along the bottom or right edge of the game/goal areas
may not get redrawn when they should be.

We can avoid the redundant drawing on resize another way.  Instead of
redrawing immediately in response to resize or expose events, we just
mark those tiles as needing update and only actually redraw after a
short delay, which is hopefully enough to catch the expose events
directly generated by the resize.
src/motif.h
src/motif_ui.c
src/x11.c