]> git.draconx.ca Git - rrace.git/blobdiff - src/motif.c
Reimplement xcounter based on pre-rendered pixmpas.
[rrace.git] / src / motif.c
index c8261fc85176d11b25d54175012ecff2d3239ff3..fe030799984fc3442aa4b35917cbdb5039eba160 100644 (file)
@@ -142,7 +142,7 @@ static void timer_tick(void *data, XtIntervalId *id)
                return;
        }
 
-       app = XtWidgetToApplicationContext(state->timer);
+       app = XtWidgetToApplicationContext(state->game);
        ui_timer_update(state, game_elapsed(&state->board));
        state->timer_tick = XtAppAddTimeOut(app, TIMER_UPDATE_MS,
                                            timer_tick, state);
@@ -233,9 +233,8 @@ static void proc_new_game(Widget w, XEvent *e, String *argv, Cardinal *argc)
 {
        game_reset(&state.board);
 
-       x11_redraw_goal(&state, -1);
+       x11_redraw_goal(&state, -1, get_shell(w));
        x11_redraw_game(&state, -1);
-       x11_redraw_icon(&state, get_shell(w));
 
        if (!state.timer_tick) {
                XtAppContext app = XtWidgetToApplicationContext(w);
@@ -282,7 +281,7 @@ static XtAppContext app_initialize(int argc, char **argv)
        state.use_ewmh_icons = ewmh_probe_wm_icon(shell);
        XtRealizeWidget(shell);
 
-       x11_redraw_icon(&state, shell);
+       x11_redraw_goal(&state, 0, shell);
 
        return app;
 }