summaryrefslogtreecommitdiff
path: root/src/widget.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-06-27 17:15:56 +0000
committerGerd Moellmann <gerd@gnu.org>2001-06-27 17:15:56 +0000
commitcd0096bdcadefbf5dbaf53cf19ae1bf61902ea03 (patch)
treecd2347db0062a133bef8cde767b5ec44e302d984 /src/widget.c
parent1d16606164c2995dddc7a6d373f9463a7f3fe3bd (diff)
downloademacs-cd0096bdcadefbf5dbaf53cf19ae1bf61902ea03.tar.gz
(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. */
#include <X11/ShellP.h>
#include "../lwlib/lwlib.h"
+#include <signal.h>
+#include "syssignal.h"
+
#define max(a, b) ((a) > (b) ? (a) : (b))
/* This sucks: this is the first default that x-faces.el tries. This won't
@@ -956,6 +959,15 @@ EmacsFrameSetCharSize (widget, columns, rows)
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
@@ -973,7 +985,11 @@ EmacsFrameSetCharSize (widget, columns, rows)
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;