]> granicus.if.org Git - nethack/commitdiff
X11: Handle the -@ parameter
authorPasi Kallinen <paxed@alt.org>
Thu, 18 Oct 2018 16:29:42 +0000 (19:29 +0300)
committerPasi Kallinen <paxed@alt.org>
Thu, 18 Oct 2018 16:29:42 +0000 (19:29 +0300)
win/X11/winmisc.c

index 945e35fc47288e998812fdc7d21f5212fbe751be..3fcf3493580f94026553ed4caa1b328188d30149 100644 (file)
@@ -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);