]> git.draconx.ca Git - rrace.git/blobdiff - src/motif_ui.c
Only redraw changed tiles when right clicking.
[rrace.git] / src / motif_ui.c
index c31d8392ac7a828694128c2ec6e617a4faff9e85..dfe4e82911434a59695646e14736a0c3546d547c 100644 (file)
@@ -223,7 +223,7 @@ static void do_input_move(struct app_state *state, int x, int y)
        if (game_do_move(&state->board, x, y) == 0) {
                uint_least32_t mask;
 
-               if (game_check_goal(&state->board)) {
+               if (game_check_goal(&state->board) == 0) {
                        int_fast32_t ms = game_finish(&state->board);
                        unsigned min, sec;
 
@@ -251,7 +251,7 @@ static void do_input_move(struct app_state *state, int x, int y)
 static void set_view_goal(struct app_state *state, int view_goal)
 {
        state->view_goal_on_game = view_goal;
-       x11_redraw_game(state, GOAL_MASK);
+       x11_redraw_game(state, game_check_goal(&state->board));
 }
 
 static void game_input(Widget w, void *data, void *cb_data)