X-Git-Url: http://git.draconx.ca/gitweb/rrace.git/blobdiff_plain/b8d5c7bc17fcb037c23d323d4f8fbdbab9894d9d..bbc28a6dec903c362ed1249ca3b31b26e0d44c15:/src/x11.c diff --git a/src/x11.c b/src/x11.c index c8ef335..dd59fd7 100644 --- a/src/x11.c +++ b/src/x11.c @@ -223,6 +223,7 @@ static void set_icon(struct app_state *state, Display *display, } XQueryColors(display, cmap, colours, XtNumber(colours)); + ewmh_icon_prepare_cmap(colours, XtNumber(colours)); wm_icon = ewmh_icon_generate(ewmhseq, colours); if (wm_icon) { XChangeProperty(display, XtWindow(shell), net_wm_icon, @@ -281,13 +282,8 @@ void x11_redraw_game(struct app_state *state, uint_fast32_t mask) unsigned sz = state->game_tile_sz; int i; - 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); - } - gp = buf; - } + if (state->flags & FLAG_VIEW_GOAL_ON_GAME) + gp = game_overlay_goal(&state->board, buf); /* Optimize the game end case where the outer frame is cleared */ if (mask & GAME_MASK & ~GOAL_MASK) {