aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mackenzie2018-10-19 17:44:31 +0000
committerAlan Mackenzie2018-10-19 17:44:31 +0000
commit7cfe2dc415d0a5768f9e6800836ff6887079dc30 (patch)
tree837db78e1b917e7b594a280097875857d172670b /src
parentd2a07b9a82a632e8baa179c667a98d275e5f6973 (diff)
downloademacs-7cfe2dc415d0a5768f9e6800836ff6887079dc30.tar.gz
emacs-7cfe2dc415d0a5768f9e6800836ff6887079dc30.zip
In edebug in GUIs, move focus to the selected frame.
Thus when entering edebug, the focus will be moved to the frame with the source being debugged, and when its finished, the focus will move back. Commands edebug-visit-eval-list (`E') and edebug-bounce-point (`p') have been likewise amended. * src/keyboard.c (readable_events): Handle FOCUS_OUT_EVENT as an invisible event. This prevents input-pending-p returning t when one of these events arrives, and thus obviates an instant termination of sit-for when there's no "real" event waiting. * lisp/emacs-lisp/edebug.el (edebug-focus-frame): New function. (edebug-default-enter, edebug--display-1, edbug-where, edebug-bounce-point) (edebug-visit-eval-list): Call edebug-focus-frame to move focus into the window newly selected by edebug-pop-to-buffer.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 8ea15d3c890..be727a6549a 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3324,7 +3324,7 @@ readable_events (int flags)
3324 if (flags & READABLE_EVENTS_DO_TIMERS_NOW) 3324 if (flags & READABLE_EVENTS_DO_TIMERS_NOW)
3325 timer_check (); 3325 timer_check ();
3326 3326
3327 /* If the buffer contains only FOCUS_IN_EVENT events, and 3327 /* If the buffer contains only FOCUS_IN/OUT_EVENT events, and
3328 READABLE_EVENTS_FILTER_EVENTS is set, report it as empty. */ 3328 READABLE_EVENTS_FILTER_EVENTS is set, report it as empty. */
3329 if (kbd_fetch_ptr != kbd_store_ptr) 3329 if (kbd_fetch_ptr != kbd_store_ptr)
3330 { 3330 {
@@ -3344,7 +3344,8 @@ readable_events (int flags)
3344#ifdef USE_TOOLKIT_SCROLL_BARS 3344#ifdef USE_TOOLKIT_SCROLL_BARS
3345 (flags & READABLE_EVENTS_FILTER_EVENTS) && 3345 (flags & READABLE_EVENTS_FILTER_EVENTS) &&
3346#endif 3346#endif
3347 event->kind == FOCUS_IN_EVENT) 3347 (event->kind == FOCUS_IN_EVENT
3348 || event->kind == FOCUS_OUT_EVENT))
3348#ifdef USE_TOOLKIT_SCROLL_BARS 3349#ifdef USE_TOOLKIT_SCROLL_BARS
3349 && !((flags & READABLE_EVENTS_IGNORE_SQUEEZABLES) 3350 && !((flags & READABLE_EVENTS_IGNORE_SQUEEZABLES)
3350 && (event->kind == SCROLL_BAR_CLICK_EVENT 3351 && (event->kind == SCROLL_BAR_CLICK_EVENT