aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2013-09-19 14:28:37 +0300
committerEli Zaretskii2013-09-19 14:28:37 +0300
commitfa93733d3481c928112d13e31c30d7d36cfa6589 (patch)
treecabfd177a15452a8f82c902903e80fbd5c63fd29 /src
parent96114a3014ee886fcc653fd00fad014f0b79d7a2 (diff)
downloademacs-fa93733d3481c928112d13e31c30d7d36cfa6589.tar.gz
emacs-fa93733d3481c928112d13e31c30d7d36cfa6589.zip
Fixed screen restoration after popping down a menu.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c2
-rw-r--r--src/term.c13
2 files changed, 10 insertions, 5 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index fba38f13783..f1df96d75a6 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1930,6 +1930,8 @@ save_current_matrix (struct frame *f)
1930 to->glyphs[TEXT_AREA] = xmalloc (nbytes); 1930 to->glyphs[TEXT_AREA] = xmalloc (nbytes);
1931 memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes); 1931 memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes);
1932 to->used[TEXT_AREA] = from->used[TEXT_AREA]; 1932 to->used[TEXT_AREA] = from->used[TEXT_AREA];
1933 to->enabled_p = from->enabled_p;
1934 to->hash = from->hash;
1933 if (from->used[LEFT_MARGIN_AREA]) 1935 if (from->used[LEFT_MARGIN_AREA])
1934 { 1936 {
1935 nbytes = from->used[LEFT_MARGIN_AREA] * sizeof (struct glyph); 1937 nbytes = from->used[LEFT_MARGIN_AREA] * sizeof (struct glyph);
diff --git a/src/term.c b/src/term.c
index e1175fac247..451d608842d 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2791,11 +2791,12 @@ DEFUN ("gpm-mouse-stop", Fgpm_mouse_stop, Sgpm_mouse_stop,
2791/* TTY menu implementation and main ideas are borrowed from msdos.c. 2791/* TTY menu implementation and main ideas are borrowed from msdos.c.
2792 2792
2793 However, unlike on MSDOS, where the menu text is drawn directly to 2793 However, unlike on MSDOS, where the menu text is drawn directly to
2794 the screen, on a TTY we use display_string (see xdisp.c) to put the 2794 the display video memory, on a TTY we use display_string (see
2795 glyphs produced from the menu items into the desired_matrix glyph 2795 display_tty_menu_item in xdisp.c) to put the glyphs produced from
2796 matrix, and then call update_frame to deliver the results to the 2796 the menu items directly into the frame's 'desired_matrix' glyph
2797 glass. The previous contents of the screen, in the form of the 2797 matrix, and then call update_frame_with_menu to deliver the results
2798 current_matrix, is stashed away, and used to restore screen 2798 to the glass. The previous contents of the screen, in the form of
2799 the current_matrix, is stashed away, and used to restore screen
2799 contents when the menu selection changes or when the final 2800 contents when the menu selection changes or when the final
2800 selection is made and the menu should be popped down. 2801 selection is made and the menu should be popped down.
2801 2802
@@ -3086,6 +3087,8 @@ restore_desired_matrix (struct frame *f, struct glyph_matrix *saved)
3086 eassert (to->glyphs[TEXT_AREA] != from->glyphs[TEXT_AREA]); 3087 eassert (to->glyphs[TEXT_AREA] != from->glyphs[TEXT_AREA]);
3087 memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes); 3088 memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes);
3088 to->used[TEXT_AREA] = from->used[TEXT_AREA]; 3089 to->used[TEXT_AREA] = from->used[TEXT_AREA];
3090 to->enabled_p = from->enabled_p;
3091 to->hash = from->hash;
3089 xfree (from->glyphs[TEXT_AREA]); 3092 xfree (from->glyphs[TEXT_AREA]);
3090 nbytes = from->used[LEFT_MARGIN_AREA] * sizeof (struct glyph); 3093 nbytes = from->used[LEFT_MARGIN_AREA] * sizeof (struct glyph);
3091 if (nbytes) 3094 if (nbytes)