]> git.draconx.ca Git - rrace.git/blobdiff - src/x11.c
motif: Combine status details into a single flags member.
[rrace.git] / src / x11.c
index 459694a4d96a122e103f2e8883316744d1940d2c..44bb8670ebec32c805917630acc9b3e32f1158d5 100644 (file)
--- a/src/x11.c
+++ b/src/x11.c
@@ -1,6 +1,6 @@
 /*
  * X11 GUI for slide puzzle game
- * Copyright © 2022 Nick Bowler
+ * Copyright © 2022-2023 Nick Bowler
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -214,7 +214,7 @@ static void set_icon(struct app_state *state, Display *display,
        XtVaSetValues(shell, XtNiconPixmap, None, (char *)NULL);
        XtVaSetValues(shell, XtNiconPixmap, state->icon_pixmap, (char *)NULL);
 
-       if (state->use_ewmh_icons) {
+       if (state->flags & FLAG_USE_EWMH_ICONS) {
                Atom net_wm_icon = XInternAtom(display, "_NET_WM_ICON", FALSE);
                Colormap cmap = DefaultColormapOfScreen(XtScreen(shell));
                XColor colours[(TILE_MAX-1)*COLOUR_MAX];
@@ -285,7 +285,7 @@ void x11_redraw_game(struct app_state *state, uint_fast32_t mask)
        unsigned sz = state->game_tile_sz;
        int i;
 
-       if (state->view_goal_on_game) {
+       if (state->flags & FLAG_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);