[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114178: Cleanup frame flushing.
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r114178: Cleanup frame flushing. |
Date: |
Mon, 09 Sep 2013 12:16:15 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114178
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Mon 2013-09-09 16:15:45 +0400
message:
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.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/dispextern.h
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
src/dispnew.c dispnew.c-20091113204419-o5vbwnq5f7feedwu-258
src/frame.h frame.h-20091113204419-o5vbwnq5f7feedwu-229
src/keyboard.c keyboard.c-20091113204419-o5vbwnq5f7feedwu-449
src/minibuf.c minibuf.c-20091113204419-o5vbwnq5f7feedwu-242
src/nsterm.m nsterm.m-20091113204419-o5vbwnq5f7feedwu-8747
src/w32term.c w32term.c-20091113204419-o5vbwnq5f7feedwu-950
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
src/xterm.c xterm.c-20091113204419-o5vbwnq5f7feedwu-244
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-09-07 00:20:56 +0000
+++ b/src/ChangeLog 2013-09-09 12:15:45 +0000
@@ -1,3 +1,24 @@
+2013-09-09 Dmitry Antipov <address@hidden>
+
+ 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.
+
2013-09-07 Paul Eggert <address@hidden>
Port --without-x --enable-gcc-warnings to Fedora 19.
=== modified file 'src/dispextern.h'
--- a/src/dispextern.h 2013-09-06 16:40:12 +0000
+++ b/src/dispextern.h 2013-09-09 12:15:45 +0000
@@ -2796,11 +2796,6 @@
/* Flush the display of frame F. For X, this is XFlush. */
void (*flush_display) (struct frame *f);
- /* Flush the display of frame F if non-NULL. This is called
- during redisplay, and should be NULL on systems which flush
- automatically before reading input. */
- void (*flush_display_optional) (struct frame *f);
-
/* Clear the mouse highlight in window W, if there is any. */
void (*clear_window_mouse_face) (struct window *w);
=== modified file 'src/dispnew.c'
--- a/src/dispnew.c 2013-09-06 07:00:29 +0000
+++ b/src/dispnew.c 2013-09-09 12:15:45 +0000
@@ -3068,7 +3068,7 @@
at least the fringes are not redrawn in a timely manner. ++kfs */
if (f->force_flush_display_p)
{
- FRAME_RIF (f)->flush_display (f);
+ flush_frame (f);
f->force_flush_display_p = 0;
}
}
=== modified file 'src/frame.h'
--- a/src/frame.h 2013-09-06 08:49:14 +0000
+++ b/src/frame.h 2013-09-09 12:15:45 +0000
@@ -1276,6 +1276,16 @@
#endif /* HAVE_WINDOW_SYSTEM */
+
+FRAME_INLINE void
+flush_frame (struct frame *f)
+{
+ struct redisplay_interface *rif = FRAME_RIF (f);
+
+ if (rif && rif->flush_display)
+ rif->flush_display (f);
+}
+
/***********************************************************************
Multimonitor data
***********************************************************************/
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2013-09-05 06:25:12 +0000
+++ b/src/keyboard.c 2013-09-09 12:15:45 +0000
@@ -9873,20 +9873,7 @@
get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW);
if (old_timers_run != timers_run && do_display)
- {
- redisplay_preserve_echo_area (8);
- /* The following fixes a bug when using lazy-lock with
- lazy-lock-defer-on-the-fly set to t, i.e. when fontifying
- from an idle timer function. The symptom of the bug is that
- the cursor sometimes doesn't become visible until the next X
- event is processed. --gerd. */
- {
- Lisp_Object tail, frame;
- FOR_EACH_FRAME (tail, frame)
- if (FRAME_RIF (XFRAME (frame)))
- FRAME_RIF (XFRAME (frame))->flush_display (XFRAME (frame));
- }
- }
+ redisplay_preserve_echo_area (8);
return input_pending;
}
=== modified file 'src/minibuf.c'
--- a/src/minibuf.c 2013-08-08 04:42:40 +0000
+++ b/src/minibuf.c 2013-09-09 12:15:45 +0000
@@ -672,12 +672,7 @@
XWINDOW (minibuf_window)->cursor.x = 0;
XWINDOW (minibuf_window)->must_be_updated_p = 1;
update_frame (XFRAME (selected_frame), 1, 1);
- {
- struct frame *f = XFRAME (XWINDOW (minibuf_window)->frame);
- struct redisplay_interface *rif = FRAME_RIF (f);
- if (rif && rif->flush_display)
- rif->flush_display (f);
- }
+ flush_frame (XFRAME (XWINDOW (minibuf_window)->frame));
}
/* Make minibuffer contents into a string. */
=== modified file 'src/nsterm.m'
--- a/src/nsterm.m 2013-09-02 06:45:04 +0000
+++ b/src/nsterm.m 2013-09-09 12:15:45 +0000
@@ -801,18 +801,6 @@
NSTRACE (ns_update_end);
}
-
-static void
-ns_flush (struct frame *f)
-/* --------------------------------------------------------------------------
- external (RIF) call
- NS impl is no-op since currently we flush in ns_update_end and elsewhere
- --------------------------------------------------------------------------
*/
-{
- NSTRACE (ns_flush);
-}
-
-
static void
ns_focus (struct frame *f, NSRect *r, int n)
/* --------------------------------------------------------------------------
@@ -3963,8 +3951,7 @@
ns_after_update_window_line,
ns_update_window_begin,
ns_update_window_end,
- ns_flush,
- 0, /* flush_display_optional */
+ 0, /* flush_display */
x_clear_window_mouse_face,
x_get_glyph_overhangs,
x_fix_overlapping_area,
=== modified file 'src/w32term.c'
--- a/src/w32term.c 2013-09-02 06:45:04 +0000
+++ b/src/w32term.c 2013-09-09 12:15:45 +0000
@@ -6258,11 +6258,6 @@
return buffer;
}
-void
-x_flush (struct frame * f)
-{ /* Nothing to do */ }
-
-
extern frame_parm_handler w32_frame_parm_handlers[];
static struct redisplay_interface w32_redisplay_interface =
@@ -6276,8 +6271,7 @@
x_after_update_window_line,
x_update_window_begin,
x_update_window_end,
- x_flush,
- 0, /* flush_display_optional */
+ 0, /* flush_display */
x_clear_window_mouse_face,
x_get_glyph_overhangs,
x_fix_overlapping_area,
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2013-09-06 16:40:12 +0000
+++ b/src/xdisp.c 2013-09-09 12:15:45 +0000
@@ -10859,7 +10859,7 @@
Can do with a display update of the echo area,
unless we displayed some mode lines. */
update_single_window (w, 1);
- FRAME_RIF (f)->flush_display (f);
+ flush_frame (f);
}
else
update_frame (f, 1, 1);
@@ -13645,9 +13645,7 @@
else
redisplay_internal ();
- if (FRAME_RIF (SELECTED_FRAME ()) != NULL
- && FRAME_RIF (SELECTED_FRAME ())->flush_display_optional)
- FRAME_RIF (SELECTED_FRAME ())->flush_display_optional (NULL);
+ flush_frame (SELECTED_FRAME ());
}
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2013-09-05 03:51:37 +0000
+++ b/src/xterm.c 2013-09-09 12:15:45 +0000
@@ -334,29 +334,19 @@
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 @@
#endif
}
-#ifndef XFlush
XFlush (FRAME_X_DISPLAY (f));
-#endif
}
@@ -10384,11 +10372,6 @@
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,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114178: Cleanup frame flushing.,
Dmitry Antipov <=