summaryrefslogtreecommitdiff
path: root/src/dispnew.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c53
1 files changed, 32 insertions, 21 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index cac4c2da4c4..5827316a7b7 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -21,9 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define DISPEXTERN_INLINE EXTERN_INLINE
-#include <signal.h>
#include <stdio.h>
-#include <setjmp.h>
#include <unistd.h>
#include "lisp.h"
@@ -297,7 +295,7 @@ DEFUN ("dump-redisplay-history", Fdump_redisplay_history,
void
__executable_start (void)
{
- abort ();
+ emacs_abort ();
}
#endif
@@ -347,7 +345,7 @@ free_glyph_matrix (struct glyph_matrix *matrix)
/* Detect the case that more matrices are freed than were
allocated. */
if (--glyph_matrix_count < 0)
- abort ();
+ emacs_abort ();
/* Free glyph memory if MATRIX owns it. */
if (matrix->pool == NULL)
@@ -2339,9 +2337,9 @@ check_glyph_memory (void)
/* Check that nothing is left allocated. */
if (glyph_matrix_count)
- abort ();
+ emacs_abort ();
if (glyph_pool_count)
- abort ();
+ emacs_abort ();
}
@@ -3024,7 +3022,7 @@ check_matrix_pointers (struct glyph_matrix *window_matrix,
{
if (!glyph_row_slice_p (window_matrix->rows + i,
frame_matrix->rows + j))
- abort ();
+ emacs_abort ();
++i, ++j;
}
}
@@ -3453,7 +3451,7 @@ check_current_matrix_flags (struct window *w)
if (!last_seen_p && MATRIX_ROW_BOTTOM_Y (row) >= yb)
last_seen_p = 1;
else if (last_seen_p && row->enabled_p)
- abort ();
+ emacs_abort ();
}
}
@@ -3952,6 +3950,11 @@ update_window_line (struct window *w, int vpos, bool *mouse_face_overwritten_p)
{
changed_p = 1;
update_marginal_area (w, LEFT_MARGIN_AREA, vpos);
+ /* Setting this flag will ensure the vertical border, if
+ any, between this window and the one on its left will be
+ redrawn. This is necessary because updating the left
+ margin area can potentially draw over the border. */
+ current_row->redraw_fringe_bitmaps_p = 1;
}
/* Update the display of the text area. */
@@ -4809,7 +4812,7 @@ scrolling (struct frame *frame)
struct glyph_matrix *desired_matrix = frame->desired_matrix;
if (!current_matrix)
- abort ();
+ emacs_abort ();
/* Compute hash codes of all the lines. Also calculate number of
changed lines, number of unchanged lines at the beginning, and
@@ -5477,7 +5480,7 @@ marginal_area_string (struct window *w, enum window_part part,
else if (part == ON_RIGHT_MARGIN)
area = RIGHT_MARGIN_AREA;
else
- abort ();
+ emacs_abort ();
for (i = 0; row->enabled_p && i < w->current_matrix->nrows; ++i, ++row)
if (wy >= row->y && wy < MATRIX_ROW_BOTTOM_Y (row))
@@ -5552,17 +5555,17 @@ marginal_area_string (struct window *w, enum window_part part,
#ifdef SIGWINCH
+static void deliver_window_change_signal (int);
+
static void
-window_change_signal (int signalnum) /* If we don't have an argument, */
- /* some compilers complain in signal calls. */
+handle_window_change_signal (int sig)
{
int width, height;
- int old_errno = errno;
-
struct tty_display_info *tty;
- signal (SIGWINCH, window_change_signal);
- SIGNAL_THREAD_CHECK (signalnum);
+ struct sigaction action;
+ emacs_sigaction_init (&action, deliver_window_change_signal);
+ sigaction (SIGWINCH, &action, 0);
/* The frame size change obviously applies to a single
termcap-controlled terminal, but we can't decide which.
@@ -5591,8 +5594,12 @@ window_change_signal (int signalnum) /* If we don't have an argument, */
change_frame_size (XFRAME (frame), height, width, 0, 1, 0);
}
}
+}
- errno = old_errno;
+static void
+deliver_window_change_signal (int sig)
+{
+ handle_on_main_thread (sig, handle_window_change_signal);
}
#endif /* SIGWINCH */
@@ -5604,7 +5611,7 @@ window_change_signal (int signalnum) /* If we don't have an argument, */
void
do_pending_window_change (bool safe)
{
- /* If window_change_signal should have run before, run it now. */
+ /* If window change signal handler should have run before, run it now. */
if (redisplaying_p && !safe)
return;
@@ -5963,7 +5970,7 @@ sit_for (Lisp_Object timeout, bool reading, int do_display)
wrong_type_argument (Qnumberp, timeout);
-#ifdef SIGIO
+#ifdef USABLE_SIGIO
gobble_input (0);
#endif
@@ -6173,7 +6180,11 @@ init_display (void)
#ifndef CANNOT_DUMP
if (initialized)
#endif /* CANNOT_DUMP */
- signal (SIGWINCH, window_change_signal);
+ {
+ struct sigaction action;
+ emacs_sigaction_init (&action, deliver_window_change_signal);
+ sigaction (SIGWINCH, &action, 0);
+ }
#endif /* SIGWINCH */
/* If running as a daemon, no need to initialize any frames/terminal. */
@@ -6277,7 +6288,7 @@ init_display (void)
/* Convert the initial frame to use the new display. */
if (f->output_method != output_initial)
- abort ();
+ emacs_abort ();
f->output_method = t->type;
f->terminal = t;