{
struct frame* f = ew->emacs_frame.frame;
*pixel_width = FONT_WIDTH (f->display.x->font);
- *pixel_height = FONT_HEIGHT (f->display.x->font);
+ *pixel_height = f->display.x->line_height;
}
static void
Widget wmshell = get_wm_shell ((Widget) ew);
Widget app_shell = XtParent ((Widget) wmshell);
-
if (! XtIsSubclass (wmshell, shellWidgetClass)) abort ();
if (! XtIsSubclass (app_shell, shellWidgetClass)) abort ();
+ /* We don't need this for the momment. The geometry is computed in
+ xfns.c. */
+#if 0
/* If the EmacsFrame doesn't have a geometry but the shell does,
treat that as the geometry of the frame. (Is this bogus?
I'm not sure.) */
flags |= (app_flags & (WidthValue | HeightValue));
}
}
-
+#endif /* 0 */
{
struct frame* frame = ew->emacs_frame.frame;
Dimension pixel_width, pixel_height;
ew->core.width = pixel_width;
ew->core.height = pixel_height;
-
+#if 0 /* xfns.c takes care of this now. */
/* If a position was specified, assign it to the shell widget.
(Else WM won't do anything with it.)
*/
/* Also assign the iconic status of the frame to the Shell, so that
the WM sees it. */
XtVaSetValues (wmshell, XtNiconic, ew->emacs_frame.iconic, 0);
+#endif /* 0 */
}
}
Dimension pixel_width, pixel_height, granted_width, granted_height;
XtGeometryResult result;
struct frame *f = ew->emacs_frame.frame;
-
+ Arg al[2];
+ int ac = 0;
+
if (columns < 3) columns = 3; /* no way buddy */
if (rows < 3) rows = 3;
- f->display.x->left_pos = f->display.x->widget->core.x;
- f->display.x->top_pos = f->display.x->widget->core.y;
-
check_frame_size (f, &rows, &columns);
f->display.x->vertical_scroll_bar_extra
= (FRAME_HAS_VERTICAL_SCROLL_BARS (f)
: 0);
char_to_pixel_size (ew, columns, rows, &pixel_width, &pixel_height);
-/* 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);
-#endif
/* Recompute the entire geometry management. */
if (ew->core.width != pixel_width || ew->core.height != pixel_height)
{
int hdelta = pixel_height - ew->core.height;
int column_widget_height = f->display.x->column_widget->core.height;
- Arg al[2];
- int ac = 0;
-
XawPanedSetRefigureMode (f->display.x->column_widget, False);
+ ac = 0;
XtSetArg (al[ac], XtNheight, pixel_height); ac++;
XtSetArg (al[ac], XtNwidth, pixel_width); ac++;
XtSetValues ((Widget) ew, al, ac);
-#if 0
- XtVaSetValues ((Widget) ew,
- XtNheight, pixel_height,
- XtNwidth, pixel_width,
- 0);
-#endif
- XtVaSetValues (f->display.x->column_widget,
- XtNwidth, pixel_width,
- XtNheight, column_widget_height + hdelta,
- 0);
+
+ ac = 0;
+ XtSetArg (al[ac], XtNheight, column_widget_height + hdelta); ac++;
+ XtSetArg (al[ac], XtNwidth, pixel_width); ac++;
+ XtSetValues (f->display.x->column_widget, al, ac);
+
XawPanedSetRefigureMode (f->display.x->column_widget, True);
}
for, then the event won't cause the screen to become garbaged, so
we have to make sure to do it here. */
SET_FRAME_GARBAGED (f);
-
- /* Coordinates of the toplevel widget seem to have been lost.
- So set it to the rignt values. */
- XtVaSetValues (f->display.x->widget,
- XtNx, f->display.x->left_pos,
- XtNy, f->display.x->top_pos,
- 0);
}