diff options
| author | Andrew Innes | 1999-05-20 20:46:01 +0000 |
|---|---|---|
| committer | Andrew Innes | 1999-05-20 20:46:01 +0000 |
| commit | 08712a41efe12d345a8260e36368688eb0b4bba9 (patch) | |
| tree | 5e5d4660421019f0f1308b472a107999c7fc284f /src | |
| parent | 487163ac866cc3b9ff364bb5b3cb5a10835ea78b (diff) | |
| download | emacs-08712a41efe12d345a8260e36368688eb0b4bba9.tar.gz emacs-08712a41efe12d345a8260e36368688eb0b4bba9.zip | |
(w32_read_socket): Reset the grabbed flag when a frame gains or
loses focus.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/w32term.c b/src/w32term.c index c309665831e..67d57927bca 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2498,11 +2498,13 @@ w32_mouse_position (fp, insist, bar_window, part, x, y, time) | |||
| 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 | ||
| @@ -3763,8 +3765,12 @@ w32_read_socket (sd, bufp, numchars, expected) | |||
| 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 | ||