- /* Figure out which tiles have been uncovered */
- tile_mask = board_right(e->x / width);
- tile_mask &= board_below(e->y / height);
- tile_mask &= board_above((e->y + e->height - 1) / height);
- tile_mask &= board_left((e->x + e->width - 1) / width);
+ mask = expose_mask(e->x, e->y, e->width, e->height, width, height);
+ x11_redraw_game(data, mask);
+}
+
+static void goal_expose(Widget w, void *data, void *cb_data)
+{
+ XmDrawingAreaCallbackStruct *cbs = cb_data;
+ XExposeEvent *e = &cbs->event->xexpose;
+ Dimension width, height;
+ uint_fast32_t mask;
+
+ XtVaGetValues(w, XmNwidth, &width, XmNheight, &height, (char *)NULL);
+ if (!(width /= 3) || !(height /= 3))
+ return;