MCPcopy Create free account
hub / github.com/NetHack/NetHack / destroy_text_window

Function destroy_text_window

win/X11/wintext.c:325–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325void
326destroy_text_window(struct xwindow *wp)
327{
328 /* Don't need to pop down, this only called from dismiss_text(). */
329
330 struct text_info_t *text_info = wp->text_information;
331
332 /*
333 * If the text window was blocked, then the user has already ACK'ed
334 * it and we are free to really destroy the window. Otherwise, don't
335 * destroy until the user dismisses the window via a key or button
336 * press.
337 */
338 if (text_info->blocked || text_info->destroy_on_ack) {
339 XtDestroyWidget(wp->popup);
340 free_text_buffer(&text_info->text);
341 free((genericptr_t) text_info), wp->text_information = 0;
342 wp->type = NHW_NONE; /* allow reuse */
343 } else {
344 text_info->destroy_on_ack = TRUE; /* destroy on next ACK */
345 }
346}
347
348void
349clear_text_window(struct xwindow *wp)

Callers 3

X11_destroy_nhwindowFunction · 0.85
delete_textFunction · 0.85
dismiss_textFunction · 0.85

Calls 1

free_text_bufferFunction · 0.85

Tested by

no test coverage detected