From 9dc6ad96da07f05217eaf4e8b9f901b7284c321f Mon Sep 17 00:00:00 2001 From: cohrs Date: Tue, 14 Oct 2003 07:55:36 +0000 Subject: [PATCH] additional X11 SAFERHANGUP changes While messing around with window closure events, I found that some such events during startup were being ignored as a result a SAFERHANGUP changes. --- win/X11/winX.c | 1 + win/X11/winmisc.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/win/X11/winX.c b/win/X11/winX.c index 0401f3770..743e42916 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -1187,6 +1187,7 @@ X11_hangup(w, event, params, num_params) Cardinal *num_params; { hangup(1); /* 1 is commonly SIGHUP, but ignored anyway */ + exit_x_event = TRUE; } /* askname ----------------------------------------------------------------- */ diff --git a/win/X11/winmisc.c b/win/X11/winmisc.c index f364f8ed4..29140e447 100644 --- a/win/X11/winmisc.c +++ b/win/X11/winmisc.c @@ -320,7 +320,7 @@ X11_player_selection() XtDestroyWidget(popup); free((genericptr_t)choices), choices = 0; - if (ps_selected == PS_QUIT) { + if (ps_selected == PS_QUIT || program_state.done_hup) { clearlocks(); X11_exit_nhwindows((char *)0); terminate(0); @@ -385,7 +385,7 @@ X11_player_selection() XtDestroyWidget(popup); free((genericptr_t)choices), choices = 0; - if (ps_selected == PS_QUIT) { + if (ps_selected == PS_QUIT || program_state.done_hup) { clearlocks(); X11_exit_nhwindows((char *)0); terminate(0); @@ -450,7 +450,7 @@ X11_player_selection() XtDestroyWidget(popup); free((genericptr_t)choices), choices = 0; - if (ps_selected == PS_QUIT) { + if (ps_selected == PS_QUIT || program_state.done_hup) { clearlocks(); X11_exit_nhwindows((char *)0); terminate(0); @@ -514,7 +514,7 @@ X11_player_selection() XtDestroyWidget(popup); free((genericptr_t)choices), choices = 0; - if (ps_selected == PS_QUIT) { + if (ps_selected == PS_QUIT || program_state.done_hup) { clearlocks(); X11_exit_nhwindows((char *)0); terminate(0); -- 2.40.0