# HG changeset patch # User Jan Dj¸«£rv # Date 1068837182 0 # Node ID 4835b200fafe628a81ffa41448a2f24bf5730cdc # Parent 0327b225b8d040ed10ab60e4d6042340d702de4b * xterm.c (x_detect_focus_change): Do not change focus frame for Enter/LeaveNotify if the current focus frame has explicit focus. diff -r 0327b225b8d0 -r 4835b200fafe src/ChangeLog --- a/src/ChangeLog Fri Nov 14 16:23:37 2003 +0000 +++ b/src/ChangeLog Fri Nov 14 19:13:02 2003 +0000 @@ -1,3 +1,8 @@ +2003-11-14 Jan Dj,Ad(Brv + + * xterm.c (x_detect_focus_change): Do not change focus frame for + Enter/LeaveNotify if the current focus frame has explicit focus. + 2003-11-14 Kim F. Storm * dispnew.c (update_text_area): Fix redisplay error when hscroll diff -r 0327b225b8d0 -r 4835b200fafe src/xterm.c --- 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: