]> git.eshelyaron.com Git - emacs.git/commitdiff
(last_mouse_press_frame): New variable.
authorRichard M. Stallman <rms@gnu.org>
Sat, 27 Jul 1996 20:30:31 +0000 (20:30 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 27 Jul 1996 20:30:31 +0000 (20:30 +0000)
(XTread_socket): Store a saved_button_event for ButtonRelease.

src/xterm.c

index 12850b0d1df688ede0cf9284fc1208919747aa6b..1b91915f4fb9cbf9141c491e88def6e31d8b1eaa 100644 (file)
@@ -195,6 +195,7 @@ static int curs_y;
 
 /* Where the mouse was last time we reported a mouse event.  */
 static FRAME_PTR last_mouse_frame;
+static FRAME_PTR last_mouse_press_frame;
 static XRectangle last_mouse_glyph;
 
 /* The scroll bar in which the last X motion event occurred.
@@ -4047,6 +4048,12 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
                    && event.xbutton.same_screen)
                  {
                    SET_SAVED_BUTTON_EVENT;
+                   last_mouse_press_frame = f;
+                 }
+               else if (event.type == ButtonRelease)
+                 {
+                   if (!f) f = last_mouse_press_frame;
+                   SET_SAVED_BUTTON_EVENT;
                  }
                else
                  goto OTHER;