Mercurial > emacs
comparison src/widget.c @ 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 | e7ac377e8b4d |
children | e6b7a921ccab |
comparison
equal
deleted
inserted
replaced
6198:d941186e8fb9 | 6199:044dcf8b9066 |
---|---|
880 f->display.x->vertical_scroll_bar_extra | 880 f->display.x->vertical_scroll_bar_extra |
881 = (FRAME_HAS_VERTICAL_SCROLL_BARS (f) | 881 = (FRAME_HAS_VERTICAL_SCROLL_BARS (f) |
882 ? VERTICAL_SCROLL_BAR_PIXEL_WIDTH (f) | 882 ? VERTICAL_SCROLL_BAR_PIXEL_WIDTH (f) |
883 : 0); | 883 : 0); |
884 char_to_pixel_size (ew, columns, rows, &pixel_width, &pixel_height); | 884 char_to_pixel_size (ew, columns, rows, &pixel_width, &pixel_height); |
885 result = XtMakeResizeRequest ((Widget)ew, | 885 |
886 /* Dont call XtMakeResize Request. This appears to not work for all | |
887 the cases. | |
888 Use XtVaSetValues instead. */ | |
889 #if 0 | |
890 result = XtMakeResizeRequest ((Widget)ew, | |
886 pixel_width, pixel_height, | 891 pixel_width, pixel_height, |
887 &granted_width, &granted_height); | 892 &granted_width, &granted_height); |
888 if (result == XtGeometryAlmost) | 893 if (result == XtGeometryAlmost) |
889 XtMakeResizeRequest ((Widget) ew, granted_width, granted_height, | 894 XtMakeResizeRequest ((Widget) ew, granted_width, granted_height, |
890 NULL, NULL); | 895 NULL, NULL); |
891 /* damn Paned widget won't ever change its width. Force it. */ | 896 #endif |
892 if (ew->core.width != pixel_width) | 897 /* Recompute the entire geometry management. */ |
898 if (ew->core.width != pixel_width || ew->core.height != pixel_height) | |
893 { | 899 { |
894 XtVaSetValues (XtParent ((Widget) ew), XtNwidth, pixel_width, 0); | 900 int hdelta = pixel_height - ew->core.height; |
895 XtVaSetValues ((Widget) ew, XtNwidth, pixel_width, 0); | 901 int column_widget_height = f->display.x->column_widget->core.height; |
902 XtVaSetValues ((Widget) ew, | |
903 XtNheight, pixel_height, | |
904 XtNwidth, pixel_width, | |
905 0); | |
906 | |
907 XtVaSetValues (f->display.x->column_widget, | |
908 XtNwidth, pixel_width, | |
909 XtNheight, column_widget_height + hdelta, | |
910 0); | |
896 } | 911 } |
897 | 912 |
898 /* We've set {FRAME,PIXEL}_{WIDTH,HEIGHT} to the values we hope to | 913 /* We've set {FRAME,PIXEL}_{WIDTH,HEIGHT} to the values we hope to |
899 receive in the ConfigureNotify event; if we get what we asked | 914 receive in the ConfigureNotify event; if we get what we asked |
900 for, then the event won't cause the screen to become garbaged, so | 915 for, then the event won't cause the screen to become garbaged, so |