Mercurial > emacs
diff src/xterm.c @ 53061:4835b200fafe
* xterm.c (x_detect_focus_change): Do not change focus frame for
Enter/LeaveNotify if the current focus frame has explicit focus.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Fri, 14 Nov 2003 19:13:02 +0000 |
parents | ea521a9007e2 |
children | 1218a42792ea |
line wrap: on
line diff
--- a/src/xterm.c Fri Nov 14 16:23:37 2003 +0000 +++ b/src/xterm.c Fri Nov 14 19:13:02 2003 +0000 @@ -3209,16 +3209,22 @@ { case EnterNotify: case LeaveNotify: - if (event->xcrossing.detail != NotifyInferior - && event->xcrossing.focus - && ! (frame->output_data.x->focus_state & FOCUS_EXPLICIT)) - nr_events = x_focus_changed ((event->type == EnterNotify - ? FocusIn : FocusOut), - FOCUS_IMPLICIT, - dpyinfo, - frame, - bufp, - numchars); + { + struct frame *focus_frame = dpyinfo->x_focus_event_frame; + int focus_state + = focus_frame ? focus_frame->output_data.x->focus_state : 0; + + if (event->xcrossing.detail != NotifyInferior + && event->xcrossing.focus + && ! (focus_state & FOCUS_EXPLICIT)) + nr_events = x_focus_changed ((event->type == EnterNotify + ? FocusIn : FocusOut), + FOCUS_IMPLICIT, + dpyinfo, + frame, + bufp, + numchars); + } break; case FocusIn: