#include <Xm/XmAll.h>
#include "motif.h"
-#include "motifstr.h"
#include "motifgui.h"
#include "xcounter.h"
#include "version.h"
{
XmDrawingAreaCallbackStruct *cbs = cb_data;
XExposeEvent *e = &cbs->event->xexpose;
+ struct app_state *state = data;
+ uint_least32_t *gp = state->board.game;
Dimension width, height;
uint_fast32_t mask;
if (!(width /= 5) || !(height /= 5))
return;
- 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);
}
static void goal_expose(Widget w, void *data, void *cb_data)
msg = version_format_head("rrace-motif");
l = XmMessageBoxGetChild(w, XmDIALOG_MESSAGE_LABEL);
- XtVaSetValues(l, XmNlabelType, XmPIXMAP_AND_STRING,
+ XtVaSetValues(l, XmNlabelType, XmSTRING,
+#if HAVE_MOTIF_PIXMAP_AND_STRING
+ XmNlabelType, XmPIXMAP_AND_STRING,
+#endif
XmNlabelPixmap, state->icon_pixmap,
STRING_ARG(XmNlabelString, msg),
(char *)NULL);