add flags.silent handling to X11_nhbell()

This commit is contained in:
PatR
2023-03-24 14:23:30 -07:00
parent 07ba3904fd
commit 8a0484321e

View File

@@ -1318,13 +1318,21 @@ X11_doprev_message(void)
return 0; return 0;
} }
/* issue a beep to alert the user about something */
void void
X11_nhbell(void) X11_nhbell(void)
{ {
/* We can't use XBell until toplevel has been initialized. */ if (!flags.silent) {
if (x_inited) /* We can't use XBell until toplevel has been initialized. */
XBell(XtDisplay(toplevel), 0); if (x_inited) {
/* else print ^G ?? */ XBell(XtDisplay(toplevel), 0);
#if 0
} else {
/* raw_print() uses puts() so appends a newline */
X11_raw_print("\a"); /* '\a' == '\007' (^G), ascii BEL */
#endif
}
}
} }
void void