changeset 6199:044dcf8b9066

(EmacsFrameSetCharSize): Don't call XtMakeResizeRequest. Use XtVaSetValues for geometry management.
author Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
date Fri, 04 Mar 1994 09:09:49 +0000
parents d941186e8fb9
children 01c57ae8ca57
files src/widget.c
diffstat 1 files changed, 20 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/widget.c	Fri Mar 04 07:52:34 1994 +0000
+++ b/src/widget.c	Fri Mar 04 09:09:49 1994 +0000
@@ -882,17 +882,32 @@
        ? VERTICAL_SCROLL_BAR_PIXEL_WIDTH (f)
        : 0);
   char_to_pixel_size (ew, columns, rows, &pixel_width, &pixel_height);
-  result = XtMakeResizeRequest ((Widget)ew,
+
+/* Dont call XtMakeResize Request. This appears to not work for all
+   the cases.
+   Use XtVaSetValues instead.  */
+#if 0
+result = XtMakeResizeRequest ((Widget)ew,
 				pixel_width, pixel_height,
 				&granted_width, &granted_height);
   if (result == XtGeometryAlmost)
     XtMakeResizeRequest ((Widget) ew, granted_width, granted_height,
 			 NULL, NULL);
-  /* damn Paned widget won't ever change its width.  Force it. */
-  if (ew->core.width != pixel_width)
+#endif
+  /* Recompute the entire geometry management.  */
+  if (ew->core.width != pixel_width || ew->core.height != pixel_height)
     {
-      XtVaSetValues (XtParent ((Widget) ew), XtNwidth, pixel_width, 0);
-      XtVaSetValues ((Widget) ew, XtNwidth, pixel_width, 0);
+      int hdelta = pixel_height - ew->core.height;
+      int column_widget_height = f->display.x->column_widget->core.height;
+      XtVaSetValues ((Widget) ew, 
+		          XtNheight, pixel_height,
+		          XtNwidth, pixel_width,
+		          0);
+
+      XtVaSetValues (f->display.x->column_widget,
+		          XtNwidth, pixel_width,
+		          XtNheight, column_widget_height + hdelta, 
+		          0);
     }
 
   /* We've set {FRAME,PIXEL}_{WIDTH,HEIGHT} to the values we hope to