| 323 | } |
| 324 | |
| 325 | void |
| 326 | destroy_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 | |
| 348 | void |
| 349 | clear_text_window(struct xwindow *wp) |
no test coverage detected