static void ContainerEventProc( ClientData clientData, /* Token for container window. */ XEvent *eventPtr) /* ResizeRequest event. */ { Container *containerPtr = (Container *)clientData; Tk_Window tkwin = (Tk_Window)containerPtr->parentPtr; if (eventPtr->type == ConfigureNotify) { /* * Resize the embedded window, if there is any. */ if (containerPtr->embeddedHWnd) { SetWindowPos(containerPtr->embeddedHWnd, NULL, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), SWP_NOZORDER); } } else if (eventPtr->type == DestroyNotify) { /* * The container is gone, remove it from the list. */ EmbedWindowDeleted(containerPtr->parentPtr); } }
static void EmbedStructureProc( ClientData clientData, /* Token for container window. */ XEvent *eventPtr) /* ResizeRequest event. */ { Container *containerPtr = clientData; Tk_ErrorHandler errHandler; if (eventPtr->type == ConfigureNotify) { if (containerPtr->embedded != None) { /* * Ignore errors, since the embedded application could have * deleted its window. */ errHandler = Tk_CreateErrorHandler(eventPtr->xfocus.display, -1, -1, -1, NULL, NULL); Tk_MoveResizeWindow((Tk_Window) containerPtr->embeddedPtr, 0, 0, (unsigned) Tk_Width((Tk_Window) containerPtr->parentPtr), (unsigned) Tk_Height((Tk_Window)containerPtr->parentPtr)); Tk_DeleteErrorHandler(errHandler); } } else if (eventPtr->type == DestroyNotify) { EmbedWindowDeleted(containerPtr->parentPtr); } }
static void EmbeddedEventProc( ClientData clientData, /* Token for container window. */ XEvent *eventPtr) /* ResizeRequest event. */ { TkWindow *winPtr = (TkWindow *) clientData; if (eventPtr->type == DestroyNotify) { EmbedWindowDeleted(winPtr); } }