comparison src/w32term.c @ 24752:80c46fd667da

(w32_read_socket): Reset the grabbed flag when a frame gains or loses focus.
author Andrew Innes <andrewi@gnu.org>
date Thu, 20 May 1999 20:46:01 +0000
parents 8f526771b25b
children 487fdbc8de0f
comparison
equal deleted inserted replaced
24751:e0eaca5025bc 24752:80c46fd667da
2496 containing the pointer. */ 2496 containing the pointer. */
2497 { 2497 {
2498 if (FRAME_W32_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame 2498 if (FRAME_W32_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
2499 && FRAME_LIVE_P (last_mouse_frame)) 2499 && FRAME_LIVE_P (last_mouse_frame))
2500 { 2500 {
2501 /* If mouse was grabbed on a frame, give coords for that frame
2502 even if the mouse is now outside it. */
2501 f1 = last_mouse_frame; 2503 f1 = last_mouse_frame;
2502 } 2504 }
2503 else 2505 else
2504 { 2506 {
2505 /* Is win one of our frames? */ 2507 /* Is window under mouse one of our frames? */
2506 f1 = x_window_to_frame (FRAME_W32_DISPLAY_INFO (*fp), WindowFromPoint(pt)); 2508 f1 = x_window_to_frame (FRAME_W32_DISPLAY_INFO (*fp), WindowFromPoint(pt));
2507 } 2509 }
2508 2510
2509 /* If not, is it one of our scroll bars? */ 2511 /* If not, is it one of our scroll bars? */
2510 if (! f1) 2512 if (! f1)
3761 x_new_focus_frame (dpyinfo, f); 3763 x_new_focus_frame (dpyinfo, f);
3762 } 3764 }
3763 else if (f == dpyinfo->w32_focus_frame) 3765 else if (f == dpyinfo->w32_focus_frame)
3764 { 3766 {
3765 x_new_focus_frame (dpyinfo, 0); 3767 x_new_focus_frame (dpyinfo, 0);
3768
3769 if (f == dpyinfo->mouse_face_mouse_frame)
3770 clear_mouse_face (dpyinfo);
3766 } 3771 }
3767 3772
3773 dpyinfo->grabbed = 0;
3768 check_visibility = 1; 3774 check_visibility = 1;
3769 break; 3775 break;
3770 3776
3771 case WM_CLOSE: 3777 case WM_CLOSE:
3772 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 3778 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);