# HG changeset patch # User Andrew Innes # Date 927233161 0 # Node ID 80c46fd667daedc345377d7f21fd2850f060130c # Parent e0eaca5025bc149b7f1136c46920a8a7a9c9aa75 (w32_read_socket): Reset the grabbed flag when a frame gains or loses focus. diff -r e0eaca5025bc -r 80c46fd667da src/w32term.c --- a/src/w32term.c Thu May 20 20:42:58 1999 +0000 +++ b/src/w32term.c Thu May 20 20:46:01 1999 +0000 @@ -2498,11 +2498,13 @@ if (FRAME_W32_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame && FRAME_LIVE_P (last_mouse_frame)) { + /* If mouse was grabbed on a frame, give coords for that frame + even if the mouse is now outside it. */ f1 = last_mouse_frame; } else { - /* Is win one of our frames? */ + /* Is window under mouse one of our frames? */ f1 = x_window_to_frame (FRAME_W32_DISPLAY_INFO (*fp), WindowFromPoint(pt)); } @@ -3763,8 +3765,12 @@ else if (f == dpyinfo->w32_focus_frame) { x_new_focus_frame (dpyinfo, 0); + + if (f == dpyinfo->mouse_face_mouse_frame) + clear_mouse_face (dpyinfo); } + dpyinfo->grabbed = 0; check_visibility = 1; break;