(tkwin)
| 978 | * |
| 979 | * Results: |
| 980 | * None. |
| 981 | * |
| 982 | * Side effects: |
| 983 | * The given window will be mapped. Windows may also |
| 984 | * be created. |
| 985 | * |
| 986 | *-------------------------------------------------------------- |
| 987 | */ |
| 988 | |
| 989 | void |
| 990 | Tk_MapWindow(tkwin) |
| 991 | Tk_Window tkwin; /* Token for window to map. */ |
| 992 | { |
| 993 | register TkWindow *winPtr = (TkWindow *) tkwin; |
| 994 | |
| 995 | if (winPtr->flags & TK_MAPPED) { |
| 996 | return; |
| 997 | } |
| 998 | if (winPtr->window == None) { |
| 999 | Tk_MakeWindowExist(tkwin); |
| 1000 | } |
| 1001 | if (winPtr->flags & TK_TOP_LEVEL) { |
| 1002 | if (!TkWmMapWindow(winPtr)) { |
| 1003 | return; |
| 1004 | } |
| 1005 | } else { |
| 1006 | /* |
| 1007 | * Don't set the mapped flag for top-level windows: TkWmMapWindow |
| 1008 | * does it if appropriate (e.g. if the window is going to be non- |
| 1009 | * iconic). |
| 1010 | */ |
| 1011 | |
| 1012 | winPtr->flags |= TK_MAPPED; |
| 1013 | } |
| 1014 | XMapWindow(winPtr->display, winPtr->window); |
| 1015 | if (!(winPtr->flags & TK_TOP_LEVEL)) { |
| 1016 | XEvent event; |
| 1017 | |
| 1018 | event.type = MapNotify; |
| 1019 | event.xmap.serial = LastKnownRequestProcessed(winPtr->display); |
| 1020 | event.xmap.send_event = False; |
| 1021 | event.xmap.display = winPtr->display; |
no test coverage detected