aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
authorStefan Monnier2014-03-20 10:09:37 -0400
committerStefan Monnier2014-03-20 10:09:37 -0400
commitcaecb91c581d4ec0fc008a35005d8009f43087ee (patch)
treea1ec19db2c583f3dfea1c53b26c6936f978bbad9 /src/term.c
parent7b9cb5448748b75a15840b7fba080cdcb341d0f7 (diff)
downloademacs-caecb91c581d4ec0fc008a35005d8009f43087ee.tar.gz
emacs-caecb91c581d4ec0fc008a35005d8009f43087ee.zip
* src/frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
* src/xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame. * src/frame.c (frame_garbaged): Make "docstring" more precise.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/term.c b/src/term.c
index 61a8d39d971..773e85faabc 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3054,7 +3054,7 @@ free_saved_screen (struct glyph_matrix *saved)
3054 int i; 3054 int i;
3055 3055
3056 if (!saved) 3056 if (!saved)
3057 return; /* already freed */ 3057 return; /* Already freed! */
3058 3058
3059 for (i = 0; i < saved->nrows; ++i) 3059 for (i = 0; i < saved->nrows; ++i)
3060 { 3060 {
@@ -3170,7 +3170,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
3170 int statecount, x, y, i; 3170 int statecount, x, y, i;
3171 bool leave, onepane; 3171 bool leave, onepane;
3172 int result IF_LINT (= 0); 3172 int result IF_LINT (= 0);
3173 int title_faces[4]; /* face to display the menu title */ 3173 int title_faces[4]; /* Face to display the menu title. */
3174 int faces[4], buffers_num_deleted = 0; 3174 int faces[4], buffers_num_deleted = 0;
3175 struct frame *sf = SELECTED_FRAME (); 3175 struct frame *sf = SELECTED_FRAME ();
3176 struct tty_display_info *tty = FRAME_TTY (sf); 3176 struct tty_display_info *tty = FRAME_TTY (sf);
@@ -3332,7 +3332,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
3332 have been opened. That does not include an open and 3332 have been opened. That does not include an open and
3333 active submenu. */ 3333 active submenu. */
3334 if (i != statecount - 2 3334 if (i != statecount - 2
3335 || state[i].menu->submenu[dy] != state[i+1].menu) 3335 || state[i].menu->submenu[dy] != state[i + 1].menu)
3336 while (i != statecount - 1) 3336 while (i != statecount - 1)
3337 { 3337 {
3338 statecount--; 3338 statecount--;
@@ -3383,7 +3383,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
3383 screen_update (sf, state[0].screen_behind); 3383 screen_update (sf, state[0].screen_behind);
3384 while (statecount--) 3384 while (statecount--)
3385 free_saved_screen (state[statecount].screen_behind); 3385 free_saved_screen (state[statecount].screen_behind);
3386 tty_show_cursor (tty); /* turn cursor back on */ 3386 tty_show_cursor (tty); /* Turn cursor back on. */
3387 fflush (tty->output); 3387 fflush (tty->output);
3388 3388
3389/* Clean up any mouse events that are waiting inside Emacs event queue. 3389/* Clean up any mouse events that are waiting inside Emacs event queue.
@@ -3474,7 +3474,7 @@ tty_menu_last_menubar_item (struct frame *f)
3474 break; 3474 break;
3475 i += 4; 3475 i += 4;
3476 } 3476 }
3477 i -= 4; /* went one too far */ 3477 i -= 4; /* Went one too far! */
3478 } 3478 }
3479 return i; 3479 return i;
3480} 3480}
@@ -3519,7 +3519,7 @@ tty_menu_new_item_coords (struct frame *f, int which, int *x, int *y)
3519 if (i < last_i) 3519 if (i < last_i)
3520 *x = XINT (AREF (items, i + 4 + 3)); 3520 *x = XINT (AREF (items, i + 4 + 3));
3521 else 3521 else
3522 *x = 0; /* wrap around to the first item */ 3522 *x = 0; /* Wrap around to the first item. */
3523 } 3523 }
3524 else if (prev_x < 0) 3524 else if (prev_x < 0)
3525 { 3525 {
@@ -3647,7 +3647,7 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
3647 3647
3648 if (!NILP (descrip)) 3648 if (!NILP (descrip))
3649 { 3649 {
3650 /* if alloca is fast, use that to make the space, 3650 /* If alloca is fast, use that to make the space,
3651 to reduce gc needs. */ 3651 to reduce gc needs. */
3652 item_data = (char *) alloca (maxwidth + SBYTES (descrip) + 1); 3652 item_data = (char *) alloca (maxwidth + SBYTES (descrip) + 1);
3653 memcpy (item_data, SSDATA (item_name), SBYTES (item_name)); 3653 memcpy (item_data, SSDATA (item_name), SBYTES (item_name));
@@ -3694,7 +3694,7 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
3694 uly = dispheight - height; 3694 uly = dispheight - height;
3695 } 3695 }
3696 3696
3697 if (FRAME_HAS_MINIBUF_P (f) && uly+height > dispheight - 2) 3697 if (FRAME_HAS_MINIBUF_P (f) && uly + height > dispheight - 2)
3698 { 3698 {
3699 /* Move the menu away of the echo area, to avoid overwriting the 3699 /* Move the menu away of the echo area, to avoid overwriting the
3700 menu with help echo messages or vice versa. */ 3700 menu with help echo messages or vice versa. */
@@ -3723,8 +3723,8 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
3723 /* If position was not given by a mouse click, adjust so upper left 3723 /* If position was not given by a mouse click, adjust so upper left
3724 corner of the menu as a whole ends up at given coordinates. This 3724 corner of the menu as a whole ends up at given coordinates. This
3725 is what x-popup-menu says in its documentation. */ 3725 is what x-popup-menu says in its documentation. */
3726 x += width/2; 3726 x += width / 2;
3727 y += 1.5*height/(maxlines+2); 3727 y += 1.5 * height / (maxlines + 2);
3728 } 3728 }
3729#endif 3729#endif
3730 3730