void test2sub(){

Widget labelw_msg;
int status;

	avs_xt_hier("Tchcksbcls2", "XtCheckSubclass");
	tet_infoline("PREP: Install error message handler");
	XtAppSetErrorMsgHandler(app_ctext, &XtEM_Proc2);
        tet_infoline("PREP: Create test label widget");
        labelw_msg = (Widget) CreateLabelWidget("Test", boxw1);
        tet_infoline("PREP: Create windows for widgets and map them");
        XtRealizeWidget(topLevel);
	tet_infoline("TEST: Error message is not generated for subclass widget");
	XtCheckSubclass(labelw_msg, coreWidgetClass, "ApTest");
	status = avs_get_event(1);
	if (status != 0) {
		tet_infoline("ERROR: Error message handler was called");
		tet_result(TET_FAIL);
		avs_set_event(1,0);
	}
	tet_infoline("TEST: Error message is not generated for class of widget");
	XtCheckSubclass(labelw_msg, XtClass(labelw_msg), "ApTest");
	status = avs_get_event(1);
	if (status != 0) {
		tet_infoline("ERROR: Error message handler was called");
		tet_result(TET_FAIL);
	}
	tet_result(TET_PASS);
}
Exemplo n.º 2
0
static void   UngrabDevice(
    Widget	widget,
    Time	time,
    Boolean	isKeyboard)
{
    XtPerDisplayInput pdi;
    XtDevice device;

    LOCK_PROCESS;
    pdi = _XtGetPerDisplayInput(XtDisplay(widget));
    UNLOCK_PROCESS;
    device = isKeyboard ? &pdi->keyboard : &pdi->pointer;
    XtCheckSubclass(widget, coreWidgetClass,
		    "in XtUngrabKeyboard or XtUngrabPointer");

    if (device->grabType != XtNoServerGrab) {

	if (device->grabType != XtPseudoPassiveServerGrab
	    && XtIsRealized(widget)) {
	    if (isKeyboard)
		XUngrabKeyboard(XtDisplay(widget), time);
	    else
		XUngrabPointer(XtDisplay(widget), time);
	}
	device->grabType = XtNoServerGrab;
	pdi->activatingKey = (KeyCode)0;
    }
}
Exemplo n.º 3
0
static
void GrabKeyOrButton (
    Widget	widget,
    KeyCode	keyOrButton,
    Modifiers	modifiers,
    Boolean	owner_events,
    int 	pointer_mode,
    int 	keyboard_mode,
    Mask	event_mask,
    Window 	confine_to,
    Cursor 	cursor,
    Boolean	isKeyboard)
{
    XtServerGrabPtr	*passiveListPtr;
    XtServerGrabPtr 	newGrab;
    XtPerWidgetInput	pwi;
    XtPerDisplayInput	pdi;


    XtCheckSubclass(widget, coreWidgetClass, "in XtGrabKey or XtGrabButton");
    LOCK_PROCESS;
    pwi = _XtGetPerWidgetInput(widget, TRUE);
    if (isKeyboard)
      passiveListPtr = &pwi->keyList;
    else
      passiveListPtr = &pwi->ptrList;
    pdi = _XtGetPerDisplayInput(XtDisplay(widget));
    UNLOCK_PROCESS;
    newGrab = CreateGrab(widget, owner_events, modifiers,
			 keyOrButton, pointer_mode, keyboard_mode,
			 event_mask, confine_to, cursor, False);
    /*
     *  if the widget is realized then process the entry into the grab
     * list. else if the list is empty (i.e. first time) then add the
     * event handler. then add the raw entry to the list for processing
     * in the handler at realize time.
     */
    if (XtIsRealized(widget))
      MakeGrab(newGrab, passiveListPtr, isKeyboard, pdi, pwi);
    else {
	if (!pwi->realize_handler_added)
	    {
		XtAddEventHandler(widget, StructureNotifyMask, FALSE,
				  RealizeHandler,
				  (XtPointer)pwi);
		pwi->realize_handler_added = TRUE;
	    }

	while (*passiveListPtr)
	    passiveListPtr = &(*passiveListPtr)->next;
	*passiveListPtr = newGrab;
    }
}
Exemplo n.º 4
0
static
void   UngrabKeyOrButton (
    Widget	widget,
    int		keyOrButton,
    Modifiers	modifiers,
    Boolean	isKeyboard)
{
    XtServerGrabRec 	tempGrab;
    XtPerWidgetInput	pwi;

    XtCheckSubclass(widget, coreWidgetClass,
		    "in XtUngrabKey or XtUngrabButton");

    /* Build a temporary grab list entry */
    tempGrab.widget = widget;
    tempGrab.modifiers = modifiers;
    tempGrab.keybut = keyOrButton;
    tempGrab.hasExt = False;

    LOCK_PROCESS;
    pwi = _XtGetPerWidgetInput(widget, FALSE);
    UNLOCK_PROCESS;
    /*
     * if there is no entry in the context manager then somethings wrong
     */
    if (!pwi)
      {
	  XtAppWarningMsg(XtWidgetToApplicationContext(widget),
		       "invalidGrab", "ungrabKeyOrButton", XtCXtToolkitError,
		       "Attempt to remove nonexistent passive grab",
		       (String *)NULL, (Cardinal *)NULL);
	  return;
      }

    if (XtIsRealized(widget))
      {
	  if (isKeyboard)
	    XUngrabKey(widget->core.screen->display,
		       keyOrButton, (unsigned int)modifiers,
		       widget->core.window);
	  else
	    XUngrabButton(widget->core.screen->display,
			  keyOrButton, (unsigned int)modifiers,
			  widget->core.window);
      }


    /* Delete all entries which are encompassed by the specified grab. */
    DeleteServerGrabFromList(isKeyboard ? &pwi->keyList : &pwi->ptrList,
			     &tempGrab);
}
Exemplo n.º 5
0
// For a given graph editor W, return its panner
Widget pannerOfGraphEdit(Widget w)
{
    XtCheckSubclass(w, GraphEditWidgetClass, "Bad widget class");

    Widget parent = w;

    while (parent != 0)
    {
	if (XtIsSubclass(parent, formWidgetClass))
	    break;
	parent = XtParent(parent);
    }
    return parent;
}
Exemplo n.º 6
0
/*
 * Public interface to redraw method
 */
void
XbaeClipRedraw(Widget w)
{
  /*
   * Make sure w is a Clip or a subclass
   */
    XtCheckSubclass(w, xbaeClipWidgetClass, NULL);

  /*
   * Call the redraw method
   */
    if (XtIsRealized(w))
      (*((XbaeClipWidgetClass) XtClass(w))->clip_class.redraw)
	((Widget)w);
}
Exemplo n.º 7
0
/*
 * Active grab of Device. clear any client side grabs so we dont lock
 */
static int GrabDevice (
    Widget	widget,
    Boolean	owner_events,
    int 	pointer_mode,
    int 	keyboard_mode,
    Mask	event_mask,
    Window 	confine_to,
    Cursor 	cursor,
    Time	time,
    Boolean	isKeyboard)
{
    XtPerDisplayInput	pdi;
    int			returnVal;

    XtCheckSubclass(widget, coreWidgetClass,
		    "in XtGrabKeyboard or XtGrabPointer");
    if (!XtIsRealized(widget))
	return GrabNotViewable;
    LOCK_PROCESS;
    pdi = _XtGetPerDisplayInput(XtDisplay(widget));
    UNLOCK_PROCESS;
    if (!isKeyboard)
      returnVal = XGrabPointer(XtDisplay(widget), XtWindow(widget),
			       owner_events, event_mask,
			       pointer_mode, keyboard_mode,
			       confine_to, cursor, time);
    else
      returnVal = XGrabKeyboard(XtDisplay(widget), XtWindow(widget),
				owner_events, pointer_mode,
				keyboard_mode, time);

    if (returnVal == GrabSuccess) {
	  XtDevice		device;

	  device = isKeyboard ? &pdi->keyboard : &pdi->pointer;
	  /* fill in the server grab rec */
	  device->grab.widget = widget;
	  device->grab.modifiers = 0;
	  device->grab.keybut = 0;
	  device->grab.ownerEvents = owner_events;
	  device->grab.pointerMode = pointer_mode;
	  device->grab.keyboardMode = keyboard_mode;
	  device->grab.hasExt = False;
	  device->grabType = XtActiveServerGrab;
	  pdi->activatingKey = (KeyCode)0;
      }
    return returnVal;
}
Exemplo n.º 8
0
    static void Resize(Widget w)
    {
	XtCheckSubclass(w, pannedGraphEditWidgetClass, "Bad widget class");
	const PannedGraphEditWidget pw = PannedGraphEditWidget(w);

	for (unsigned i = 0; i < pw->composite.num_children; i++)
	{
	    // Resize each graphEdit child
	    Widget child = pw->composite.children[i];
	    if (XtIsSubclass(child, graphEditWidgetClass))
		graphEditSizeChanged(child);
	}

	// Call superclass resize method
	pannedGraphEditClassRec.core_class.superclass->core_class.resize(w);
    }
void test1sub(){

Widget labelw_msg;
int status;
pid_t pid2;

	FORK(pid2);
	avs_xt_hier("Tchcksbcls1", "XtCheckSubclass");
	tet_infoline("PREP: Install error message handler");
	XtAppSetErrorMsgHandler(app_ctext, &XtEM_Proc);
        tet_infoline("PREP: Create test label widget");
        labelw_msg = (Widget) CreateLabelWidget("Test", boxw1);
        tet_infoline("PREP: Create windows for widgets and map them");
        XtRealizeWidget(topLevel);
	tet_infoline("TEST: Error message is generated for non-subclass widget");
	XtCheckSubclass(labelw_msg, commandWidgetClass, "ApTest");
	KROF(pid2);
	status = avs_get_event(1);
	if (status != 1) {
		tet_infoline("ERROR: Error message handler was not called");
		tet_result(TET_FAIL);
	}
	tet_result(TET_PASS);
}
Exemplo n.º 10
0
void DviSaveToFile(Widget w, FILE *fp)
{
	XtCheckSubclass(w, dviWidgetClass, NULL);
	(*((DviWidgetClass) XtClass(w))->command_class.save)(w, fp);
}
Exemplo n.º 11
0
static void PortholeCB(Widget w, 
		       XtPointer client_data, 
		       XtPointer call_data)
{
    // Setup panner after change in porthole

    XtCheckSubclass(w, pannedGraphEditWidgetClass, "Bad widget class");
    const PannedGraphEditWidget pw = PannedGraphEditWidget(w);

    Arg args[10];
    int arg = 0;
    XawPannerReport *report = (XawPannerReport *) call_data;
    Widget panner = Widget(client_data);

    Widget form = XtParent(w);
    Dimension form_width, form_height, form_border_width;
    XtVaGetValues(form,
		  XtNwidth,       &form_width,
		  XtNheight,      &form_height,
		  XtNborderWidth, &form_border_width,
		  XtPointer(0));

    WidgetList children;
    XtVaGetValues(w,
                  XtNchildren, &children,
                  XtPointer(0));
    Widget graph_edit = children[0];

    arg = 0;
    XtSetArg (args[arg], ARGSTR(XtNsliderX), report->slider_x); arg++;
    XtSetArg (args[arg], ARGSTR(XtNsliderY), report->slider_y); arg++;
    if (report->changed != (XawPRSliderX | XawPRSliderY))
    {
	XtSetArg (args[arg], ARGSTR(XtNsliderWidth),  report->slider_width);  arg++;
	XtSetArg (args[arg], ARGSTR(XtNsliderHeight), report->slider_height); arg++;
	XtSetArg (args[arg], ARGSTR(XtNcanvasWidth),  report->canvas_width);  arg++;
	XtSetArg (args[arg], ARGSTR(XtNcanvasHeight), report->canvas_height); arg++;
    }
    XtSetValues (panner, args, arg);

    // std::clog << "Form   size " << BoxPoint(form_width, form_height) << "\n";
    // std::clog << "Canvas size " << BoxPoint(report->canvas_width, 
    //                                         report->canvas_height) << "\n";

    Dimension scale, panner_border_width;
    XtVaGetValues(panner, 
		  XtNdefaultScale, &scale,
		  XtNborderWidth,  &panner_border_width,
		  XtPointer(0));

    // Determine new panner size
    Dimension panner_width  = 
	min(max((report->canvas_width * scale) / 100, 
		pw->pannedGraphEdit.minimumPannerWidth),
	    (form_width * pw->pannedGraphEdit.maximumScale) / 100);

    Dimension panner_height = 
	min(max((report->canvas_height * scale) / 100, 
		pw->pannedGraphEdit.minimumPannerHeight), 
	    (form_height * pw->pannedGraphEdit.maximumScale) / 100);

    // std::clog << "Panner size " << BoxPoint(panner_width, panner_height) << "\n";

    Dimension extra_width;
    Dimension extra_height;
    Graph *graph;
    XtVaGetValues(graph_edit,
		  XtNextraWidth,  &extra_width,
		  XtNextraHeight, &extra_height,
		  XtNgraph,       &graph,
		  XtPointer(0));

    bool need_panner = 
	graph != 0
	&& graph->firstVisibleNode() != 0
	&& (report->canvas_width  - extra_width  >= form_width ||
	    report->canvas_height - extra_height >= form_height);

    if (need_panner && panner_width > 0 && panner_height > 0)
    {
	// Map panner in lower right edge of the form

	Dimension panner_window_width = 
	    panner_width  + panner_border_width * 2;
	Dimension panner_window_height = 
	    panner_height + panner_border_width * 2;

	if (!XtIsManaged(panner))
	    XtManageChild(panner);

	// Add the panner size as extra space to graph editor such
	// that the panner cannot obscure parts of the graph.

	extra_width =  panner_window_width;
	extra_height = panner_window_height;
	XtVaSetValues(graph_edit,
		      XtNextraWidth,  extra_width,
		      XtNextraHeight, extra_height,
		      XtPointer(0));

	int panner_x = form_width  - form_border_width - panner_window_width;
	int panner_y = form_height - form_border_width - panner_window_height;

	XtConfigureWidget(panner,
			  panner_x, panner_y, 
			  panner_width, panner_height,
			  panner_border_width);
    }
    else
    {
	// Unmap panner
	XtUnmanageChild(panner);
	XtVaSetValues(graph_edit,
		      XtNextraWidth,  0,
		      XtNextraHeight, 0,
		      XtPointer(0));
    }
}
Exemplo n.º 12
0
Arquivo: gwin.c Projeto: deadpixi/sam
/* The returned answer should be free()ed when no longer needed */
String
GwinSelectionSwap(Widget w, String s)
{
    XtCheckSubclass(w, gwinWidgetClass, NULL);
    return (*((GwinWidgetClass) XtClass(w))->gwin_class.select_swap)(w, s);
}
Exemplo n.º 13
0
XtGeometryResult
_XtMakeGeometryRequest (
    Widget widget,
    XtWidgetGeometry *request,
    XtWidgetGeometry *reply,
    Boolean * clear_rect_obj)
{
    XtWidgetGeometry    junk;
    XtGeometryHandler manager = (XtGeometryHandler) NULL;
    XtGeometryResult returnCode;
    Widget parent = widget->core.parent;
    Boolean managed, parentRealized, rgm = False;
    XtConfigureHookDataRec req;
    Widget hookobj;

    *clear_rect_obj = FALSE;

    CALLGEOTAT(_XtGeoTrace(widget,
                           "\"%s\" is making a %sgeometry request to its parent \"%s\".\n",
                           XtName(widget),
                           ((request->request_mode & XtCWQueryOnly))? "query only ":"",
                           (XtParent(widget))?XtName(XtParent(widget)):"Root"));
    CALLGEOTAT(_XtGeoTab(1));

    if (XtIsShell(widget)) {
        ShellClassExtension ext;
        LOCK_PROCESS;
        for (ext = (ShellClassExtension)((ShellWidgetClass)XtClass(widget))
                   ->shell_class.extension;
                ext != NULL && ext->record_type != NULLQUARK;
                ext = (ShellClassExtension)ext->next_extension);

        if (ext != NULL) {
            if (  ext->version == XtShellExtensionVersion
                    && ext->record_size == sizeof(ShellClassExtensionRec)) {
                manager = ext->root_geometry_manager;
                rgm = True;
            } else {
                String params[1];
                Cardinal num_params = 1;
                params[0] = XtClass(widget)->core_class.class_name;
                XtAppErrorMsg(XtWidgetToApplicationContext(widget),
                              "invalidExtension", "xtMakeGeometryRequest",
                              XtCXtToolkitError,
                              "widget class %s has invalid ShellClassExtension record",
                              params, &num_params);
            }
        } else {
            XtAppErrorMsg(XtWidgetToApplicationContext(widget),
                          "internalError", "xtMakeGeometryRequest",
                          XtCXtToolkitError,
                          "internal error; ShellClassExtension is NULL",
                          NULL, NULL);
        }
        managed = True;
        parentRealized = TRUE;
        UNLOCK_PROCESS;
    } else { /* not shell */
        if (parent == NULL)
            XtAppErrorMsg(XtWidgetToApplicationContext(widget),
                          "invalidParent","xtMakeGeometryRequest",
                          XtCXtToolkitError,
                          "non-shell has no parent in XtMakeGeometryRequest",
                          (String *)NULL, (Cardinal *)NULL);

        managed = XtIsManaged(widget);
        parentRealized = XtIsRealized(parent);
        if (XtIsComposite(parent))
        {
            LOCK_PROCESS;
            manager = ((CompositeWidgetClass) (parent->core.widget_class))
                      ->composite_class.geometry_manager;
            UNLOCK_PROCESS;
        }
    }

#if 0
    /*
     * The Xt spec says that these conditions must generate
     * error messages (not warnings), but many Xt applications
     * and toolkits (including parts of Xaw, Motif and Netscape)
     * depend on the previous Xt behaviour.  Thus, these tests
     * should probably remain disabled.
     */
    if (parentRealized && managed) {
        if (parent && !XtIsComposite(parent))
        {
            /*
             * This shouldn't ever happen, we only test for this to pass
             * VSW5.  Normally managing the widget will catch this, but VSW5
             * does some really screwy stuff to get here.
             */
            XtAppErrorMsg(XtWidgetToApplicationContext(widget),
                          "invalidParent", "xtMakeGeometryRequest",
                          XtCXtToolkitError,
                          "XtMakeGeometryRequest - parent not composite",
                          (String *)NULL, (Cardinal *)NULL);
        }
        else if (manager == (XtGeometryHandler) NULL)
        {
            XtAppErrorMsg(XtWidgetToApplicationContext(widget),
                          "invalidGeometryManager","xtMakeGeometryRequest",
                          XtCXtToolkitError,
                          "XtMakeGeometryRequest - parent has no geometry manager",
                          (String *)NULL, (Cardinal *)NULL);
        }
    }
#else
    if (!manager)
        managed = False;
#endif

    if (widget->core.being_destroyed) {
        CALLGEOTAT(_XtGeoTab(-1));
        CALLGEOTAT(_XtGeoTrace(widget,
                               "It is being destroyed, just return XtGeometryNo.\n"));
        return XtGeometryNo;
    }

    /* see if requesting anything to change */
    req.changeMask = 0;
    if (request->request_mode & CWStackMode
            && request->stack_mode != XtSMDontChange) {
        req.changeMask |= CWStackMode;
        CALLGEOTAT(_XtGeoTrace(widget,
                               "Asking for a change in StackMode!\n"));
        if (request->request_mode & CWSibling) {
            XtCheckSubclass(request->sibling, rectObjClass,
                            "XtMakeGeometryRequest");
            req.changeMask |= CWSibling;
        }
    }
    if (request->request_mode & CWX
            && widget->core.x != request->x) {
        CALLGEOTAT(_XtGeoTrace(widget,
                               "Asking for a change in x: from %d to %d.\n",
                               widget->core.x, request->x));
        req.changeMask |= CWX;
    }
    if (request->request_mode & CWY
            && widget->core.y != request->y) {
        CALLGEOTAT(_XtGeoTrace(widget,
                               "Asking for a change in y: from %d to %d.\n",
                               widget->core.y, request->y));
        req.changeMask |= CWY;
    }
    if (request->request_mode & CWWidth
            && widget->core.width != request->width) {
        CALLGEOTAT(_XtGeoTrace(widget,"Asking for a change in width: from %d to %d.\n",
                               widget->core.width, request->width));
        req.changeMask |= CWWidth;
    }
    if (request->request_mode & CWHeight
            && widget->core.height != request->height) {
        CALLGEOTAT(_XtGeoTrace(widget,
                               "Asking for a change in height: from %d to %d.\n",
                               widget->core.height, request->height));
        req.changeMask |= CWHeight;
    }
    if (request->request_mode & CWBorderWidth
            && widget->core.border_width != request->border_width) {
        CALLGEOTAT(_XtGeoTrace(widget,
                               "Asking for a change in border_width: from %d to %d.\n",
                               widget->core.border_width, request->border_width));
        req.changeMask |= CWBorderWidth;
    }
    if (! req.changeMask) {
        CALLGEOTAT(_XtGeoTrace(widget,
                               "Asking for nothing new,\n"));
        CALLGEOTAT(_XtGeoTab(-1));
        CALLGEOTAT(_XtGeoTrace(widget,
                               "just return XtGeometryYes.\n"));
        return XtGeometryYes;
    }
    req.changeMask |= (request->request_mode & XtCWQueryOnly);

    if ( !(req.changeMask & XtCWQueryOnly) && XtIsRealized(widget) ) {
        /* keep record of the current geometry so we know what's changed */
        req.changes.x = widget->core.x ;
        req.changes.y = widget->core.y ;
        req.changes.width = widget->core.width ;
        req.changes.height = widget->core.height ;
        req.changes.border_width = widget->core.border_width ;
    }

    if (!managed || !parentRealized) {
        CALLGEOTAT(_XtGeoTrace(widget,
                               "Not Managed or Parent not realized.\n"));
        /* Don't get parent's manager involved--assume the answer is yes */
        if (req.changeMask & XtCWQueryOnly) {
            /* He was just asking, don't change anything, just tell him yes */
            CALLGEOTAT(_XtGeoTrace(widget,"QueryOnly request\n"));
            CALLGEOTAT(_XtGeoTab(-1));
            CALLGEOTAT(_XtGeoTrace(widget,"just return XtGeometryYes.\n"));
            return XtGeometryYes;
        } else {
            CALLGEOTAT(_XtGeoTrace(widget,
                                   "Copy values from request to widget.\n"));
            /* copy values from request to widget */
            if (request->request_mode & CWX)
                widget->core.x = request->x;
            if (request->request_mode & CWY)
                widget->core.y = request->y;
            if (request->request_mode & CWWidth)
                widget->core.width = request->width;
            if (request->request_mode & CWHeight)
                widget->core.height = request->height;
            if (request->request_mode & CWBorderWidth)
                widget->core.border_width = request->border_width;
            if (!parentRealized) {
                CALLGEOTAT(_XtGeoTab(-1));
                CALLGEOTAT(_XtGeoTrace(widget,"and return XtGeometryYes.\n"));
                return XtGeometryYes;
            }
            else returnCode = XtGeometryYes;
        }
    } else {
        /* go ask the widget's geometry manager */
        CALLGEOTAT(_XtGeoTrace(widget,
                               "Go ask the parent geometry manager.\n"));
        if (reply == (XtWidgetGeometry *) NULL) {
            returnCode = (*manager)(widget, request, &junk);
        } else {
            returnCode = (*manager)(widget, request, reply);
        }
    }

    /*
     * If Unrealized, not a XtGeometryYes, or a query-only then we are done.
     */

    if ((returnCode != XtGeometryYes) ||
            (req.changeMask & XtCWQueryOnly) || !XtIsRealized(widget)) {

#ifdef XT_GEO_TATTLER
        switch(returnCode) {
        case XtGeometryNo:
            CALLGEOTAT(_XtGeoTab(-1));
            CALLGEOTAT(_XtGeoTrace(widget,"\"%s\" returns XtGeometryNo.\n",
                                   (XtParent(widget))?XtName(XtParent(widget)):"Root"));
            /* check for no change */
            break ;
        case XtGeometryDone:
            CALLGEOTAT(_XtGeoTab(-1));
            CALLGEOTAT(_XtGeoTrace(widget,"\"%s\" returns XtGeometryDone.\n",
                                   (XtParent(widget))?XtName(XtParent(widget)):"Root"));
            /* check for no change in queryonly */
            break ;
        case XtGeometryAlmost:
            CALLGEOTAT(_XtGeoTab(-1));
            CALLGEOTAT(_XtGeoTrace(widget,"\"%s\" returns XtGeometryAlmost.\n",
                                   (XtParent(widget))?XtName(XtParent(widget)):"Root"));
            CALLGEOTAT(_XtGeoTab(1));
            CALLGEOTAT(_XtGeoTrace(widget,"Proposal: width %d height %d.\n",
                                   (reply)?reply->width:junk.width,
                                   (reply)?reply->height:junk.height));
            CALLGEOTAT(_XtGeoTab(-1));

            /* check for no change */
            break ;
        case XtGeometryYes:
            if (req.changeMask & XtCWQueryOnly) {
                CALLGEOTAT(_XtGeoTrace(widget,
                                       "QueryOnly specified, no configuration.\n"));
            }
            if (!XtIsRealized(widget)) {
                CALLGEOTAT(_XtGeoTrace(widget,
                                       "\"%s\" not realized, no configuration.\n",
                                       XtName(widget)));
            }
            CALLGEOTAT(_XtGeoTab(-1));
            CALLGEOTAT(_XtGeoTrace(widget,"\"%s\" returns XtGeometryYes.\n",
                                   (XtParent(widget))?XtName(XtParent(widget)):"Root"));
            break ;
        }
#endif
        return returnCode;
    }

    CALLGEOTAT(_XtGeoTab(-1));
    CALLGEOTAT(_XtGeoTrace(widget,"\"%s\" returns XtGeometryYes.\n",
                           (XtParent(widget))?XtName(XtParent(widget)):"Root"));

    if (XtIsWidget(widget)) {	/* reconfigure the window (if needed) */

        if (rgm) return returnCode;

        if (req.changes.x != widget->core.x) {
            req.changeMask |= CWX;
            req.changes.x = widget->core.x;
            CALLGEOTAT(_XtGeoTrace(widget,
                                   "x changing to %d\n",widget->core.x));
        }
        if (req.changes.y != widget->core.y) {
            req.changeMask |= CWY;
            req.changes.y = widget->core.y;
            CALLGEOTAT(_XtGeoTrace(widget,
                                   "y changing to %d\n",widget->core.y));
        }
        if (req.changes.width != widget->core.width) {
            req.changeMask |= CWWidth;
            req.changes.width = widget->core.width;
            CALLGEOTAT(_XtGeoTrace(widget,
                                   "width changing to %d\n",widget->core.width));
        }
        if (req.changes.height != widget->core.height) {
            req.changeMask |= CWHeight;
            req.changes.height = widget->core.height;
            CALLGEOTAT(_XtGeoTrace(widget,
                                   "height changing to %d\n",widget->core.height));
        }
        if (req.changes.border_width != widget->core.border_width) {
            req.changeMask |= CWBorderWidth;
            req.changes.border_width = widget->core.border_width;
            CALLGEOTAT(_XtGeoTrace(widget,
                                   "border_width changing to %d\n",
                                   widget->core.border_width));
        }
        if (req.changeMask & CWStackMode) {
            req.changes.stack_mode = request->stack_mode;
            CALLGEOTAT(_XtGeoTrace(widget,"stack_mode changing\n"));
            if (req.changeMask & CWSibling) {
                if (XtIsWidget(request->sibling))
                    req.changes.sibling = XtWindow(request->sibling);
                else
                    req.changeMask &= ~(CWStackMode | CWSibling);
            }
        }

#ifdef XT_GEO_TATTLER
        if (req.changeMask) {
            CALLGEOTAT(_XtGeoTrace(widget,
                                   "XConfigure \"%s\"'s window.\n",
                                   XtName(widget)));
        } else {
            CALLGEOTAT(_XtGeoTrace(widget,
                                   "No window configuration needed for \"%s\".\n",
                                   XtName(widget)));
        }
#endif

        XConfigureWindow(XtDisplay(widget), XtWindow(widget),
                         req.changeMask, &req.changes);
    }
    else {			/* RectObj child of realized Widget */
        *clear_rect_obj = TRUE;
        CALLGEOTAT(_XtGeoTrace(widget,
                               "ClearRectObj on \"%s\".\n",XtName(widget)));

        ClearRectObjAreas((RectObj)widget, &req.changes);
    }
    hookobj = XtHooksOfDisplay(XtDisplayOfObject(widget));;
    if (XtHasCallbacks(hookobj, XtNconfigureHook) == XtCallbackHasSome) {
        req.type = XtHconfigure;
        req.widget = widget;
        XtCallCallbackList(hookobj,
                           ((HookObject)hookobj)->hooks.confighook_callbacks,
                           (XtPointer)&req);
    }

    return returnCode;
} /* _XtMakeGeometryRequest */