#include "lisp.h"
#include "xterm.h"
+#include "keyboard.h"
#include "frame.h"
#include "window.h"
#include <X11/ShellP.h>
#include "../lwlib/lwlib.h"
-#define max(a, b) ((a) > (b) ? (a) : (b))
+#include <signal.h>
+#include "syssignal.h"
/* This sucks: this is the first default that x-faces.el tries. This won't
be used unless neither the "Emacs.EmacsFrame" resource nor the
: (FRAME_SCROLL_BAR_COLS (frame)
* FONT_WIDTH (frame->output_data.x->font)));
- frame->output_data.x->flags_areas_extra
- = FRAME_FLAGS_AREA_WIDTH (frame);
+ x_compute_fringe_widths (frame, 0);
change_frame_size (frame, h, w, 1, 0, 0);
char_to_pixel_size (ew, w, h, &pixel_width, &pixel_height);
/* ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;*/
XtVaSetValues (wmshell,
- XtNbaseWidth, base_width,
- XtNbaseHeight, base_height,
- XtNwidthInc, cw,
- XtNheightInc, ch,
- XtNminWidth, base_width + min_cols * cw,
- XtNminHeight, base_height + min_rows * ch,
+ XtNbaseWidth, (XtArgVal) base_width,
+ XtNbaseHeight, (XtArgVal) base_height,
+ XtNwidthInc, (XtArgVal) cw,
+ XtNheightInc, (XtArgVal) ch,
+ XtNminWidth, (XtArgVal) (base_width + min_cols * cw),
+ XtNminHeight, (XtArgVal) (base_height + min_rows * ch),
NULL);
}
if (cur->emacs_frame.iconic != new->emacs_frame.iconic)
{
Widget wmshell = get_wm_shell ((Widget) cur);
- XtVaSetValues (wmshell, XtNiconic, new->emacs_frame.iconic, NULL);
+ XtVaSetValues (wmshell, XtNiconic,
+ (XtArgVal) new->emacs_frame.iconic, NULL);
}
return needs_a_refresh;
? 0
: (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font)));
- f->output_data.x->flags_areas_extra
- = FRAME_FLAGS_AREA_WIDTH (f);
+ x_compute_fringe_widths (f, 0);
char_to_pixel_size (ew, columns, rows, &pixel_width, &pixel_height);
int old_left = f->output_data.x->widget->core.x;
int old_top = f->output_data.x->widget->core.y;
+ /* Input is blocked here, and Xt waits for some event to
+ occur. */
+
lw_refigure_widget (f->output_data.x->column_widget, False);
update_hints_inhibit = 1;
- /* Do parents first, otherwise LessTif's geometry
- management enters an infinite loop (as of 2000-01-15). */
+ /* 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, outer_widget_height + hdelta,
- XtNwidth, outer_widget_width + wdelta, NULL);
+ XtNheight, (XtArgVal) (outer_widget_height + hdelta),
+ XtNwidth, (XtArgVal) (outer_widget_width + wdelta),
+ NULL);
XtVaSetValues (f->output_data.x->column_widget,
- XtNheight, column_widget_height + hdelta,
- XtNwidth, column_widget_width + wdelta, NULL);
+ XtNheight, (XtArgVal) (column_widget_height + hdelta),
+ XtNwidth, (XtArgVal) column_widget_width + wdelta,
+ NULL);
XtVaSetValues ((Widget) ew,
- XtNheight, pixel_height,
- XtNwidth, pixel_width, NULL);
-
+ XtNheight, (XtArgVal) pixel_height,
+ XtNwidth, (XtArgVal) pixel_width,
+ NULL);
+#ifdef SIGIO
+ sigunblock (sigmask (SIGIO));
+#endif
+ turn_on_atimers (1);
+
lw_refigure_widget (f->output_data.x->column_widget, True);
update_hints_inhibit = 0;