diff options
| author | Eli Zaretskii | 2014-01-25 10:25:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2014-01-25 10:25:51 +0200 |
| commit | e96f7bf11ebeef086c48776ecfe8c41a1c0db7c4 (patch) | |
| tree | 0649dfcf7ef5204a2d9449b630b885de2f0556eb /src | |
| parent | caece7c39334aec764ec661e04490030b3c80385 (diff) | |
| download | emacs-e96f7bf11ebeef086c48776ecfe8c41a1c0db7c4.tar.gz emacs-e96f7bf11ebeef086c48776ecfe8c41a1c0db7c4.zip | |
Fix bug #16479 with client connections while TTY menu is open.
src/term.c (read_menu_input): If the selected frame changes, exit
the menu.
(tty_menu_show): If the selected frame changes while we displayed
a menu, throw to top level.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/term.c | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 98c890c97b4..89b4c06def1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-01-25 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * term.c (read_menu_input): If the selected frame changes, exit | ||
| 4 | the menu. | ||
| 5 | (tty_menu_show): If the selected frame changes while we displayed | ||
| 6 | a menu, throw to top level. (Bug#16479) | ||
| 7 | |||
| 1 | 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca> | 8 | 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 9 | ||
| 3 | * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change. | 10 | * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change. |
diff --git a/src/term.c b/src/term.c index 4d8da135f6e..0c40c2d16b9 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3124,7 +3124,11 @@ read_menu_input (struct frame *sf, int *x, int *y, int min_y, int max_y, | |||
| 3124 | tty->showing_menu = 0; | 3124 | tty->showing_menu = 0; |
| 3125 | do_mouse_tracking = saved_mouse_tracking; | 3125 | do_mouse_tracking = saved_mouse_tracking; |
| 3126 | 3126 | ||
| 3127 | if (EQ (cmd, Qt) || EQ (cmd, Qtty_menu_exit)) | 3127 | if (EQ (cmd, Qt) || EQ (cmd, Qtty_menu_exit) |
| 3128 | /* If some input switched frames under our feet, exit the | ||
| 3129 | menu, since the menu faces are no longer valid, and the | ||
| 3130 | menu is no longer relevant anyway. */ | ||
| 3131 | || sf != SELECTED_FRAME ()) | ||
| 3128 | return MI_QUIT_MENU; | 3132 | return MI_QUIT_MENU; |
| 3129 | if (EQ (cmd, Qtty_menu_mouse_movement)) | 3133 | if (EQ (cmd, Qtty_menu_mouse_movement)) |
| 3130 | mouse_get_xy (x, y); | 3134 | mouse_get_xy (x, y); |
| @@ -3791,6 +3795,11 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps, | |||
| 3791 | case TTYM_IA_SELECT: | 3795 | case TTYM_IA_SELECT: |
| 3792 | break; | 3796 | break; |
| 3793 | case TTYM_NO_SELECT: | 3797 | case TTYM_NO_SELECT: |
| 3798 | /* If the selected frame was changed while we displayed a menu, | ||
| 3799 | throw to top level in order to undo any temporary settings | ||
| 3800 | made by TTY menu code. */ | ||
| 3801 | if (f != SELECTED_FRAME ()) | ||
| 3802 | Ftop_level (); | ||
| 3794 | /* Make "Cancel" equivalent to C-g unless FOR_CLICK (which means | 3803 | /* Make "Cancel" equivalent to C-g unless FOR_CLICK (which means |
| 3795 | the menu was invoked with a mouse event as POSITION). */ | 3804 | the menu was invoked with a mouse event as POSITION). */ |
| 3796 | if (! for_click) | 3805 | if (! for_click) |