MCPcopy Create free account
hub / github.com/SimHacker/micropolis / Tk_MapWindow

Function Tk_MapWindow

micropolis-activity/src/tk/tkwindow.c:980–1018  ·  view source on GitHub ↗
(tkwin)

Source from the content-addressed store, hash-verified

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
989void
990Tk_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;

Callers 10

DelayedMapFunction · 0.85
PopupPieMenuFunction · 0.85
DelayedMapFunction · 0.85
RecomputePlacementFunction · 0.85
ArrangePackingFunction · 0.85
MenuWidgetCmdFunction · 0.85
DisplayWinItemFunction · 0.85
MapFrameFunction · 0.85
Tk_WmCmdFunction · 0.85
DelayedMapFunction · 0.85

Calls 3

Tk_MakeWindowExistFunction · 0.85
TkWmMapWindowFunction · 0.85
Tk_HandleEventFunction · 0.70

Tested by

no test coverage detected