summaryrefslogtreecommitdiff
path: root/src/xterm.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-09-09 16:15:45 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-09-09 16:15:45 +0400
commitfd462129af606e37146cad265284ff4097051ad8 (patch)
tree9e7774cf6fa5228da2b148db6d2a6b4f0e480d35 /src/xterm.c
parent992ec28ae836a2954f6f24ce49b4fba0cde1bf7d (diff)
downloademacs-fd462129af606e37146cad265284ff4097051ad8.tar.gz
Cleanup frame flushing.
* dispextern.h (struct redisplay_interface): Drop flush_display_optional because flush_display is enough for X and flushing via RIF is just a no-op for others. * frame.h (flush_frame): New function. * dispnew.c (update_frame): * minibuf.c (read_minibuf): * xdisp.c (echo_area_display, redisplay_preserve_echo_area): Use it. * keyboard.c (detect_input_pending_run_timers): Do not flush all frames but selected one in redisplay_preserve_echo_area. * nsterm.m (ns_flush): Remove no-op. (ns_redisplay_interface): Adjust user. * w32term.h (x_flush): Remove no-op. (w32_redisplay_interface): Adjust user. * xterm.c (x_flush): Simplify because we do not flush all frames at once any more. Adjust comment. (x_redisplay_interface): Adjust user.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 2f3d5ca7a01..d12173297e8 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -334,29 +334,19 @@ static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t);
static void x_initialize (void);
-/* Flush display of frame F, or of all frames if F is null. */
+/* Flush display of frame F. */
static void
x_flush (struct frame *f)
{
+ eassert (f && FRAME_X_P (f));
/* Don't call XFlush when it is not safe to redisplay; the X
connection may be broken. */
if (!NILP (Vinhibit_redisplay))
return;
block_input ();
- if (f)
- {
- eassert (FRAME_X_P (f));
- XFlush (FRAME_X_DISPLAY (f));
- }
- else
- {
- /* Flush all displays and so all frames on them. */
- struct x_display_info *xdi;
- for (xdi = x_display_list; xdi; xdi = xdi->next)
- XFlush (xdi->display);
- }
+ XFlush (FRAME_X_DISPLAY (f));
unblock_input ();
}
@@ -7361,9 +7351,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x,
#endif
}
-#ifndef XFlush
XFlush (FRAME_X_DISPLAY (f));
-#endif
}
@@ -10384,11 +10372,6 @@ static struct redisplay_interface x_redisplay_interface =
x_update_window_begin,
x_update_window_end,
x_flush,
-#ifdef XFlush
- x_flush,
-#else
- 0, /* flush_display_optional */
-#endif
x_clear_window_mouse_face,
x_get_glyph_overhangs,
x_fix_overlapping_area,