summaryrefslogtreecommitdiff
path: root/src/dispnew.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-06-02 17:57:51 +0300
committerEli Zaretskii <eliz@gnu.org>2012-06-02 17:57:51 +0300
commitb5e9cbb6fdce4b7e8c5cd6ad1addf6e4af35da67 (patch)
treec6a1b2060e5d56677f6785c2241311527fa917fa /src/dispnew.c
parentf51b6486fc8b0e3fa7fd08cbf83b27ef0d5efe1a (diff)
Initial incomplete version of tty menus. tty_menu_activate not done yet.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index a23f2b9a95..0c97512447 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3337,6 +3337,39 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
return paused_p;
}
+/* Update a TTY frame F that has a menu dropped down over some of its
+ glyphs. This is like the second part of update_frame, but it
+ doesn't call build_frame_matrix, because we already have the
+ desired matrix prepared, and don't want it to be overwritten by the
+ text of the normal display. */
+void
+update_frame_with_menu (struct frame *f)
+{
+ struct window *root_window = XWINDOW (f->root_window);
+
+ xassert (FRAME_TERMCAP_P (f));
+
+ /* We are working on frame matrix basis. Set the frame on whose
+ frame matrix we operate. */
+ set_frame_matrix_frame (f);
+
+ /* Update the display */
+ update_begin (f);
+ paused_p = update_frame_1 (f, 1, 1);
+ update_end (f);
+
+ if (FRAME_TTY (f)->termscript)
+ fflush (FRAME_TTY (f)->termscript);
+ fflush (FRAME_TTY (f)->output);
+ /* Check window matrices for lost pointers. */
+#if GLYPH_DEBUG
+ check_window_matrix_pointers (root_window);
+ add_frame_display_history (f, paused_p);
+#endif
+
+ /* Reset flags indicating that a window should be updated. */
+ set_window_update_flags (root_window, 0);
+}
/************************************************************************