comparison src/widget.c @ 6087:00fbbb620f36

(EmacsFrameSetCharSize): Call check_frame_size and update vertical_scroll_bar_extra. Call SET_FRAME_GARBAGED.
author Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
date Fri, 25 Feb 1994 09:10:22 +0000
parents b50531f2f37e
children e7ac377e8b4d
comparison
equal deleted inserted replaced
6086:fc2dc869f5d4 6087:00fbbb620f36
869 int rows; 869 int rows;
870 { 870 {
871 EmacsFrame ew = (EmacsFrame) widget; 871 EmacsFrame ew = (EmacsFrame) widget;
872 Dimension pixel_width, pixel_height, granted_width, granted_height; 872 Dimension pixel_width, pixel_height, granted_width, granted_height;
873 XtGeometryResult result; 873 XtGeometryResult result;
874 struct frame *f = ew->emacs_frame.frame;
875
874 if (columns < 3) columns = 3; /* no way buddy */ 876 if (columns < 3) columns = 3; /* no way buddy */
875 if (rows < 3) rows = 3; 877 if (rows < 3) rows = 3;
876 878
879 check_frame_size (f, &rows, &columns);
880 f->display.x->vertical_scroll_bar_extra
881 = (FRAME_HAS_VERTICAL_SCROLL_BARS (f)
882 ? VERTICAL_SCROLL_BAR_PIXEL_WIDTH (f)
883 : 0);
877 char_to_pixel_size (ew, columns, rows, &pixel_width, &pixel_height); 884 char_to_pixel_size (ew, columns, rows, &pixel_width, &pixel_height);
878 result = XtMakeResizeRequest ((Widget)ew, 885 result = XtMakeResizeRequest ((Widget)ew,
879 pixel_width, pixel_height, 886 pixel_width, pixel_height,
880 &granted_width, &granted_height); 887 &granted_width, &granted_height);
881 if (result == XtGeometryAlmost) 888 if (result == XtGeometryAlmost)
885 if (ew->core.width != pixel_width) 892 if (ew->core.width != pixel_width)
886 { 893 {
887 XtVaSetValues (XtParent ((Widget) ew), XtNwidth, pixel_width, 0); 894 XtVaSetValues (XtParent ((Widget) ew), XtNwidth, pixel_width, 0);
888 XtVaSetValues ((Widget) ew, XtNwidth, pixel_width, 0); 895 XtVaSetValues ((Widget) ew, XtNwidth, pixel_width, 0);
889 } 896 }
890 } 897
898 /* 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
900 for, then the event won't cause the screen to become garbaged, so
901 we have to make sure to do it here. */
902 SET_FRAME_GARBAGED (f);
903 }