#include <assert.h>
#include <X11/Intrinsic.h>
-#include <Xm/XmStrDefs.h>
+#include <X11/StringDefs.h>
#include <X11/Xatom.h>
#include <X11/Shell.h>
#include "motif.h"
Dimension w, h;
int i;
- XtVaGetValues(state->goal, XmNwidth, &w, XmNheight, &h, (char *)NULL);
+ XtVaGetValues(state->goal, XtNwidth, &w, XtNheight, &h, (char *)NULL);
for (i = 0; i < 9; i++) {
int x = i%3, y = i/3;
}
/*
- * Clear and reset XmNiconPixmap otherwise it seems dtwm will not
+ * Clear and reset XtNiconPixmap otherwise it seems dtwm will not
* notice the changed icon.
*/
- XtVaSetValues(shell, XmNiconPixmap, None, (char *)NULL);
- XtVaSetValues(shell, XmNiconPixmap, state->icon_pixmap, (char *)NULL);
+ XtVaSetValues(shell, XtNiconPixmap, None, (char *)NULL);
+ XtVaSetValues(shell, XtNiconPixmap, state->icon_pixmap, (char *)NULL);
if (wm_icon) {
Atom net_wm_icon = XInternAtom(display, "_NET_WM_ICON", FALSE);
{
Display *display = XtDisplay(state->goal);
Window game = XtWindow(state->game);
- uint_least32_t *gp = state->board.game;
+ uint_least32_t buf[3], *gp = state->board.game;
Dimension w, h;
int i;
- XtVaGetValues(state->game, XmNwidth, &w, XmNheight, &h, (char *)NULL);
+ XtVaGetValues(state->game, XtNwidth, &w, XtNheight, &h, (char *)NULL);
w /= 5; h /= 5;
+ if (state->view_goal_on_game) {
+ for (i = 0; i < 3; i++) {
+ buf[i] = state->board.goal[i];
+ buf[i] = (gp[i] & ~GOAL_MASK) | (buf[i] << GOAL_SHIFT);
+ }
+ gp = buf;
+ }
+
for (i = 0; i < 25; i++) {
if (mask & 1) {
redraw_tile(state, display, game,