From: Karl Heuer Date: Thu, 28 Apr 1994 07:59:17 +0000 (+0000) Subject: (XTread_socket): Only top window cares about LeaveNotify. X-Git-Tag: emacs-19.34~8684 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=10c5e63d2373803e1bbf52217c6e65527c09283f;p=emacs.git (XTread_socket): Only top window cares about LeaveNotify. --- diff --git a/src/xterm.c b/src/xterm.c index f35d3be6e5d..b8e410f8f30 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3913,26 +3913,28 @@ XTread_socket (sd, bufp, numchars, waitp, expected) case LeaveNotify: - f = x_any_window_to_frame (event.xcrossing.window); - - if (f == mouse_face_mouse_frame) - /* If we move outside the frame, - then we're certainly no longer on any text in the frame. */ - clear_mouse_face (); - - if (event.xcrossing.focus) - { - if (! x_focus_event_frame) - x_new_focus_frame (0); - else - x_new_focus_frame (f); - } - else + f = x_top_window_to_frame (event.xcrossing.window); + if (f) { - if (f == x_focus_event_frame) - x_focus_event_frame = 0; - if (f == x_focus_frame) - x_new_focus_frame (0); + if (f == mouse_face_mouse_frame) + /* If we move outside the frame, + then we're certainly no longer on any text in the frame. */ + clear_mouse_face (); + + if (event.xcrossing.focus) + { + if (! x_focus_event_frame) + x_new_focus_frame (0); + else + x_new_focus_frame (f); + } + else + { + if (f == x_focus_event_frame) + x_focus_event_frame = 0; + if (f == x_focus_frame) + x_new_focus_frame (0); + } } #ifdef USE_X_TOOLKIT goto OTHER;