summaryrefslogtreecommitdiff
path: root/src/w32term.c
diff options
context:
space:
mode:
authorAndrew Innes <andrewi@gnu.org>1999-05-20 20:46:01 +0000
committerAndrew Innes <andrewi@gnu.org>1999-05-20 20:46:01 +0000
commit08712a41efe12d345a8260e36368688eb0b4bba9 (patch)
tree5e5d4660421019f0f1308b472a107999c7fc284f /src/w32term.c
parent487163ac866cc3b9ff364bb5b3cb5a10835ea78b (diff)
downloademacs-08712a41efe12d345a8260e36368688eb0b4bba9.tar.gz
(w32_read_socket): Reset the grabbed flag when a frame gains or
loses focus.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c8
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)
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 @@ w32_read_socket (sd, bufp, numchars, expected)
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;