]> git.eshelyaron.com Git - emacs.git/commitdiff
(XTmouse_position, XTread_socket): Don't use last_mouse_frame if it's dead.
authorKarl Heuer <kwzh@gnu.org>
Mon, 25 Apr 1994 22:55:33 +0000 (22:55 +0000)
committerKarl Heuer <kwzh@gnu.org>
Mon, 25 Apr 1994 22:55:33 +0000 (22:55 +0000)
src/xterm.c

index 0ae434b2b17c5ad271fde8726e6403c09f4eb344..f2a45d6514f8581b3a453059763aa74ec6035161 100644 (file)
@@ -2485,7 +2485,7 @@ XTmouse_position (f, bar_window, part, x, y, time)
 
        win = root;
 
-       if (x_mouse_grabbed)
+       if (x_mouse_grabbed && 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.  */
@@ -3993,7 +3993,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
 #ifdef HAVE_X11
        case MotionNotify:
          {
-           if (x_mouse_grabbed)
+           if (x_mouse_grabbed && FRAME_LIVE_P (last_mouse_frame))
              f = last_mouse_frame;
            else
              f = x_window_to_frame (event.xmotion.window);