From 4a25c1cb1e1be8fa3ceea455b7f442cfb507eb39 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 29 Apr 2014 08:12:36 -0700 Subject: * src/process.c (handle_child_signal): Handle systems without WCONTINUED Fixes: debbugs:15110 --- src/ChangeLog | 8 ++++++-- src/process.c | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 0c8fa7b31d7..af9270fb7a4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,12 @@ +2014-04-29 Glenn Morris + + * process.c (handle_child_signal): + Handle systems without WCONTINUED. (Bug#15110, 17339) + 2014-04-23 Eli Zaretskii * search.c (Fnewline_cache_check): Don't try to count newlines - outside the buffer's restriction, as find_newline doesn't support - that. + outside the buffer's restriction, as find_newline doesn't support that. 2014-04-22 Paul Eggert diff --git a/src/process.c b/src/process.c index 2c66b9e976e..07b690e6ebd 100644 --- a/src/process.c +++ b/src/process.c @@ -6225,7 +6225,11 @@ handle_child_signal (int sig) int status; if (p->alive - && child_status_changed (p->pid, &status, WUNTRACED | WCONTINUED)) +#ifndef WCONTINUED + && child_status_changed (p->pid, &status, WUNTRACED)) +#else + && child_status_changed (p->pid, &status, WUNTRACED | WCONTINUED)) +#endif { /* Change the status of the process that was found. */ p->tick = ++process_tick; -- cgit v1.2.1 From a55ea27f60f94ff3fc3e02e253056137fc56c35b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 29 Apr 2014 18:33:37 +0300 Subject: Place hardware TTY cursor at the active menu item when displaying a menu. src/term.c (tty_menu_display): Move the cursor to the active menu item. (tty_menu_activate): Return the cursor to the active menu item after displaying the menu and after displaying help-echo. See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html for the details of why this is needed by screen readers and Braille displays. --- src/ChangeLog | 10 ++++++++++ src/term.c | 17 +++++++++++++++++ 2 files changed, 27 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index af9270fb7a4..c98b8546788 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2014-04-29 Eli Zaretskii + + * term.c (tty_menu_display): Move the cursor to the active menu + item. + (tty_menu_activate): Return the cursor to the active menu item + after displaying the menu and after displaying help-echo. See + http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html + for the details of why this is needed by screen readers and + Braille displays. + 2014-04-29 Glenn Morris * process.c (handle_child_signal): diff --git a/src/term.c b/src/term.c index 9e6cfe2f41d..354354fa745 100644 --- a/src/term.c +++ b/src/term.c @@ -2897,6 +2897,13 @@ tty_menu_display (tty_menu *menu, int x, int y, int pn, int *faces, menu_help_paneno = pn - 1; menu_help_itemno = j; } + /* Take note of the coordinates of the active menu item, to + display the cursor there. */ + if (mousehere) + { + row = y + i; + col = x; + } display_tty_menu_item (menu->text[j], max_width, face, x, y + i, menu->submenu[j] != NULL); } @@ -3177,6 +3184,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, bool first_time; Lisp_Object selectface; int first_item = 0; + int col, row; /* Don't allow non-positive x0 and y0, lest the menu will wrap around the display. */ @@ -3364,6 +3372,11 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, faces, x, y, first_item, 1); tty_hide_cursor (tty); fflush (tty->output); + /* The call to display help-echo below will move the cursor, + so remember its current position as computed by + tty_menu_display. */ + col = cursorX (tty); + row = cursorY (tty); } /* Display the help-echo message for the currently-selected menu @@ -3373,6 +3386,10 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, { help_callback (menu_help_message, menu_help_paneno, menu_help_itemno); + /* Move the cursor to the beginning of the current menu + item, so that screen readers and other accessibility aids + know where the active region is. */ + cursor_to (sf, row, col); tty_hide_cursor (tty); fflush (tty->output); prev_menu_help_message = menu_help_message; -- cgit v1.2.1 From bc6cb3efd06266e5f51862449700e2e559277095 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 30 Apr 2014 10:54:27 -0700 Subject: * term.c (tty_menu_activate): Don't assume row and col are initialized. GCC 4.9.0 warned about this, and I couldn't easily prove to my own satisfaction that they would always be initialized. --- src/ChangeLog | 6 ++++++ src/term.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index c98b8546788..ab87645b48b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-04-30 Paul Eggert + + * term.c (tty_menu_activate): Don't assume row and col are initialized. + GCC 4.9.0 warned about this, and I couldn't easily prove to my own + satisfaction that they would always be initialized. + 2014-04-29 Eli Zaretskii * term.c (tty_menu_display): Move the cursor to the active menu diff --git a/src/term.c b/src/term.c index 354354fa745..3bbb21f1589 100644 --- a/src/term.c +++ b/src/term.c @@ -3378,6 +3378,8 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, col = cursorX (tty); row = cursorY (tty); } + else + row = -1; /* Display the help-echo message for the currently-selected menu item. */ @@ -3389,7 +3391,8 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, /* Move the cursor to the beginning of the current menu item, so that screen readers and other accessibility aids know where the active region is. */ - cursor_to (sf, row, col); + if (0 <= row) + cursor_to (sf, row, col); tty_hide_cursor (tty); fflush (tty->output); prev_menu_help_message = menu_help_message; -- cgit v1.2.1