X-Git-Url: http://git.draconx.ca/gitweb/rrace.git/blobdiff_plain/2160e352fae550a6a25bc37c68c251214cb7119f..43a709ff25b9973a83327a06a6ecc94b09e7787b:/src/motif.c diff --git a/src/motif.c b/src/motif.c index f98b307..52afaae 100644 --- a/src/motif.c +++ b/src/motif.c @@ -135,9 +135,15 @@ static void proc_exit(Widget w, XEvent *e, String *argv, Cardinal *argc) static void proc_new_game(Widget w, XEvent *e, String *argv, Cardinal *argc) { + Widget shell; + + for (shell = w; !XtIsWMShell(shell);) + shell = XtParent(shell); + game_reset(&state.board); x11_redraw_goal(&state); x11_redraw_game(&state); + x11_redraw_icon(&state, shell); } static const XtActionsRec menu_actions[] = { @@ -158,8 +164,11 @@ static XtAppContext app_initialize(int argc, char **argv) ui_initialize(&state, shell); x11_initialize(&state, XtScreen(shell)); game_reset(&state.board); + state.use_ewmh_icons = ewmh_probe_wm_icon(shell); XtRealizeWidget(shell); + x11_redraw_icon(&state, shell); + return app; }