Destroy will dismiss the window if the window has not * already been dismissed. */
| 863 | * already been dismissed. |
| 864 | */ |
| 865 | void |
| 866 | mswin_destroy_nhwindow(winid wid) |
| 867 | { |
| 868 | logDebug("mswin_destroy_nhwindow(%d)\n", wid); |
| 869 | |
| 870 | if ((GetNHApp()->windowlist[wid].type == NHW_MAP) |
| 871 | || (GetNHApp()->windowlist[wid].type == NHW_MESSAGE) |
| 872 | || (GetNHApp()->windowlist[wid].type == NHW_STATUS)) { |
| 873 | /* main windows is going to take care of those */ |
| 874 | return; |
| 875 | } |
| 876 | |
| 877 | if (wid != -1) { |
| 878 | if (!GetNHApp()->windowlist[wid].dead |
| 879 | && GetNHApp()->windowlist[wid].win != NULL) |
| 880 | DestroyWindow(GetNHApp()->windowlist[wid].win); |
| 881 | GetNHApp()->windowlist[wid].win = NULL; |
| 882 | GetNHApp()->windowlist[wid].type = 0; |
| 883 | GetNHApp()->windowlist[wid].dead = 0; |
| 884 | } |
| 885 | } |
| 886 | |
| 887 | /* Next output to window will start at (x,y), also moves |
| 888 | displayable cursor to (x,y). For backward compatibility, |
no test coverage detected