- mask = expose_mask(e->x, e->y, e->width, e->height, width, height);
- x11_redraw_game(data, mask);
+ /*
+ * Only draw exposed nonempty tiles; exposed areas are filled with the
+ * background automatically and thus exposed empty spaces don't need
+ * to be drawn again.
+ */
+ mask = gp[0] | gp[1] | gp[2];
+ mask &= expose_mask(e->x, e->y, e->width, e->height, width, height);
+
+ x11_redraw_game(state, mask);