351c351 < ( (FormWidget)w, w->core.width, w->core.height ); --- > ( (FormWidget)w, w->core.width, w->core.height, w->core.depth ); 409a410,484 > /* Function Name: ComputeWithForceBars > * Description: Computes the layout give forcebars is set. > * Arguments: widget - the viewport widget. > * query - whether or not to query the child. > * intended - the cache of the childs height is > * stored here ( USED AND RETURNED ). > * clip_width, clip_height - size of clip window. > * (USED AND RETURNED ). > * Returns: none. > */ > > static void > ComputeWithForceBars(widget, query, intended, clip_width, clip_height) > Widget widget; > Boolean query; > XtWidgetGeometry * intended; > int *clip_width, *clip_height; > { > ViewportWidget w = (ViewportWidget)widget; > register Widget child = w->viewport.child; > XtWidgetGeometry preferred; > > /* > * If forcebars then needs = allows = has. > * Thus if needsvert is set it MUST have a scrollbar. > */ > > if (w->viewport.allowvert) > *clip_width -= w->viewport.vert_bar->core.width + > w->viewport.vert_bar->core.border_width; > > if (w->viewport.allowhoriz) > *clip_height -= w->viewport.horiz_bar->core.height + > w->viewport.horiz_bar->core.border_width; > > AssignMax( *clip_width, 1 ); > AssignMax( *clip_height, 1 ); > > if (!w->viewport.allowvert) { > intended->height = *clip_height; > intended->request_mode = CWHeight; > } > if (!w->viewport.allowhoriz) { > intended->width = *clip_width; > intended->request_mode = CWWidth; > } > > if ( query ) { > if ( (w->viewport.allowvert || w->viewport.allowhoriz) ) { > XtQueryGeometry( child, intended, &preferred ); > > if ( !(intended->request_mode & CWWidth) ) > if ( preferred.request_mode & CWWidth ) > intended->width = preferred.width; > else > intended->width = child->core.width; > > if ( !(intended->request_mode & CWHeight) ) > if ( preferred.request_mode & CWHeight ) > intended->height = preferred.height; > else > intended->height = child->core.height; > } > } > else { > if (w->viewport.allowvert) > intended->height = child->core.height; > if (w->viewport.allowhoriz) > intended->width = child->core.width; > } > > AssignMax(intended->width, *clip_width); > AssignMax(intended->height, *clip_height); > } > 424d498 < static void ComputeWithForceBars(); 610,684d683 < /* Function Name: ComputeWithForceBars < * Description: Computes the layout give forcebars is set. < * Arguments: widget - the viewport widget. < * query - whether or not to query the child. < * intended - the cache of the childs height is < * stored here ( USED AND RETURNED ). < * clip_width, clip_height - size of clip window. < * (USED AND RETURNED ). < * Returns: none. < */ < < static void < ComputeWithForceBars(widget, query, intended, clip_width, clip_height) < Widget widget; < Boolean query; < XtWidgetGeometry * intended; < int *clip_width, *clip_height; < { < ViewportWidget w = (ViewportWidget)widget; < register Widget child = w->viewport.child; < XtWidgetGeometry preferred; < < /* < * If forcebars then needs = allows = has. < * Thus if needsvert is set it MUST have a scrollbar. < */ < < if (w->viewport.allowvert) < *clip_width -= w->viewport.vert_bar->core.width + < w->viewport.vert_bar->core.border_width; < < if (w->viewport.allowhoriz) < *clip_height -= w->viewport.horiz_bar->core.height + < w->viewport.horiz_bar->core.border_width; < < AssignMax( *clip_width, 1 ); < AssignMax( *clip_height, 1 ); < < if (!w->viewport.allowvert) { < intended->height = *clip_height; < intended->request_mode = CWHeight; < } < if (!w->viewport.allowhoriz) { < intended->width = *clip_width; < intended->request_mode = CWWidth; < } < < if ( query ) { < if ( (w->viewport.allowvert || w->viewport.allowhoriz) ) { < XtQueryGeometry( child, intended, &preferred ); < < if ( !(intended->request_mode & CWWidth) ) < if ( preferred.request_mode & CWWidth ) < intended->width = preferred.width; < else < intended->width = child->core.width; < < if ( !(intended->request_mode & CWHeight) ) < if ( preferred.request_mode & CWHeight ) < intended->height = preferred.height; < else < intended->height = child->core.height; < } < } < else { < if (w->viewport.allowvert) < intended->height = child->core.height; < if (w->viewport.allowhoriz) < intended->width = child->core.width; < } < < AssignMax(intended->width, *clip_width); < AssignMax(intended->height, *clip_height); < } <