aboutsummaryrefslogtreecommitdiffstats
path: root/src/widget.c
diff options
context:
space:
mode:
authorGerd Moellmann2001-06-27 17:16:23 +0000
committerGerd Moellmann2001-06-27 17:16:23 +0000
commita5d3ec3f4924b184ee4aef06e07837752a1942c7 (patch)
treed8fed85dfc9085dc445f8f94d53d60295509f3ed /src/widget.c
parent45a21f75516577e7aa5fcbbb17794de642fb580a (diff)
downloademacs-a5d3ec3f4924b184ee4aef06e07837752a1942c7.tar.gz
emacs-a5d3ec3f4924b184ee4aef06e07837752a1942c7.zip
(EmacsFrameSetCharSize): Turn off atimers and block
SIGIO around the code where Xt might wait for a ConfigureNotifyEvent. (toplevel): Include <signal.h> and syssignal.h.
Diffstat (limited to 'src/widget.c')
-rw-r--r--src/widget.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/widget.c b/src/widget.c
index a7ba3e3536e..b4ec35dcd36 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -51,6 +51,9 @@ Boston, MA 02111-1307, USA. */
51#include <X11/ShellP.h> 51#include <X11/ShellP.h>
52#include "../lwlib/lwlib.h" 52#include "../lwlib/lwlib.h"
53 53
54#include <signal.h>
55#include "syssignal.h"
56
54#define max(a, b) ((a) > (b) ? (a) : (b)) 57#define max(a, b) ((a) > (b) ? (a) : (b))
55 58
56/* This sucks: this is the first default that x-faces.el tries. This won't 59/* This sucks: this is the first default that x-faces.el tries. This won't
@@ -956,6 +959,15 @@ EmacsFrameSetCharSize (widget, columns, rows)
956 XtVaSetValues (f->output_data.x->widget, 959 XtVaSetValues (f->output_data.x->widget,
957 XtNwaitForWm, (XtArgVal) f->output_data.x->wait_for_wm, 960 XtNwaitForWm, (XtArgVal) f->output_data.x->wait_for_wm,
958 NULL); 961 NULL);
962
963 /* Workaround: When a SIGIO or SIGALRM occurs while Xt is
964 waiting for a ConfigureNotify event (see above), this leads
965 to Xt waiting indefinitely instead of using its default
966 timeout (5 seconds). */
967 turn_on_atimers (0);
968#ifdef SIGIO
969 sigblock (sigmask (SIGIO));
970#endif
959 971
960 /* Do parents first, otherwise LessTif's geometry management 972 /* Do parents first, otherwise LessTif's geometry management
961 enters an infinite loop (as of 2000-01-15). This is fixed in 973 enters an infinite loop (as of 2000-01-15). This is fixed in
@@ -973,7 +985,11 @@ EmacsFrameSetCharSize (widget, columns, rows)
973 XtNheight, (XtArgVal) pixel_height, 985 XtNheight, (XtArgVal) pixel_height,
974 XtNwidth, (XtArgVal) pixel_width, 986 XtNwidth, (XtArgVal) pixel_width,
975 NULL); 987 NULL);
976 988#ifdef SIGIO
989 sigunblock (sigmask (SIGIO));
990#endif
991 turn_on_atimers (1);
992
977 lw_refigure_widget (f->output_data.x->column_widget, True); 993 lw_refigure_widget (f->output_data.x->column_widget, True);
978 994
979 update_hints_inhibit = 0; 995 update_hints_inhibit = 0;