diff options
author | Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr> | 1994-03-04 09:09:49 +0000 |
---|---|---|
committer | Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr> | 1994-03-04 09:09:49 +0000 |
commit | 57aa60d8f1580bbaed98645a61bf1a9d65f6adfb (patch) | |
tree | 328cd0fff501aa5a59e15643ebe3e2e68c8922e9 /src/widget.c | |
parent | 6f3e8e346c7367628499982b955ab38582462637 (diff) | |
download | emacs-57aa60d8f1580bbaed98645a61bf1a9d65f6adfb.tar.gz |
(EmacsFrameSetCharSize): Don't call XtMakeResizeRequest. Use XtVaSetValues for
geometry management.
Diffstat (limited to 'src/widget.c')
-rw-r--r-- | src/widget.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/widget.c b/src/widget.c index a1282f397dd..a24db0e306c 100644 --- a/src/widget.c +++ b/src/widget.c @@ -882,17 +882,32 @@ EmacsFrameSetCharSize (widget, columns, rows) ? 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 |