- ac = 0;
- XtSetArg (al[ac], XtNheight, pixel_height); ac++;
- XtSetArg (al[ac], XtNwidth, pixel_width); ac++;
- XtSetValues ((Widget) ew, al, ac);
-
- ac = 0;
- XtSetArg (al[ac], XtNheight, column_widget_height + hdelta); ac++;
- XtSetArg (al[ac], XtNwidth, column_widget_width + wdelta); ac++;
- XtSetValues (f->output_data.x->column_widget, al, ac);
-
- ac = 0;
- XtSetArg (al[ac], XtNheight, outer_widget_height + hdelta); ac++;
- XtSetArg (al[ac], XtNwidth, outer_widget_width + wdelta); ac++;
- XtSetValues (f->output_data.x->widget, al, ac);
-
+ /* Xt waits for a ConfigureNotify event from the window manager
+ in EmacsFrameSetCharSize when the shell widget is resized.
+ For some window managers like fvwm2 2.2.5 and KDE 2.1 this
+ event doesn't arrive for an unknown reason and Emacs hangs in
+ Xt when the default font is changed. Tell Xt not to wait,
+ depending on the value of the frame parameter
+ `wait-for-wm'. */
+ XtVaSetValues (f->output_data.x->widget,
+ XtNwaitForWm, (XtArgVal) f->output_data.x->wait_for_wm,
+ NULL);
+
+ /* Workaround: When a SIGIO or SIGALRM occurs while Xt is
+ waiting for a ConfigureNotify event (see above), this leads
+ to Xt waiting indefinitely instead of using its default
+ timeout (5 seconds). */
+ turn_on_atimers (0);
+#ifdef SIGIO
+ sigblock (sigmask (SIGIO));
+#endif
+
+ /* Do parents first, otherwise LessTif's geometry management
+ enters an infinite loop (as of 2000-01-15). This is fixed in
+ later versions of LessTif (as of 2001-03-13); I'll leave it
+ as is because I think it can't do any harm. */
+ XtVaSetValues (f->output_data.x->widget,
+ XtNheight, (XtArgVal) (outer_widget_height + hdelta),
+ XtNwidth, (XtArgVal) (outer_widget_width + wdelta),
+ NULL);
+ XtVaSetValues (f->output_data.x->column_widget,
+ XtNheight, (XtArgVal) (column_widget_height + hdelta),
+ XtNwidth, (XtArgVal) column_widget_width + wdelta,
+ NULL);
+ XtVaSetValues ((Widget) ew,
+ XtNheight, (XtArgVal) pixel_height,
+ XtNwidth, (XtArgVal) pixel_width,
+ NULL);
+#ifdef SIGIO
+ sigunblock (sigmask (SIGIO));
+#endif
+ turn_on_atimers (1);
+