From: Pasi Kallinen Date: Thu, 18 Oct 2018 16:29:42 +0000 (+0300) Subject: X11: Handle the -@ parameter X-Git-Tag: NetHack-3.6.2_Released~185^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d454855c540ca92e506d885b16f3594848fbfc7a;p=nethack X11: Handle the -@ parameter --- diff --git a/win/X11/winmisc.c b/win/X11/winmisc.c index 945e35fc4..3fcf34935 100644 --- a/win/X11/winmisc.c +++ b/win/X11/winmisc.c @@ -1237,12 +1237,15 @@ X11_player_selection_dialog() XtRealizeWidget(popup); X11_player_selection_randomize(); - ps_selected = -1; - - nh_XtPopup(popup, (int) XtGrabExclusive, form); + if (flags.randomall) { + plsel_dialog_acceptvalues(); + } else { + ps_selected = -1; + nh_XtPopup(popup, (int) XtGrabExclusive, form); + } /* The callback will enable the event loop exit. */ - (void) x_event(EXIT_ON_EXIT); + (void) x_event(flags.randomall ? EXIT_ON_SENT_EVENT : EXIT_ON_EXIT); nh_XtPopdown(popup); XtDestroyWidget(popup);