changeset 15793:fc460a98a7f9

(last_mouse_press_frame): New variable. (XTread_socket): Store a saved_button_event for ButtonRelease.
author Richard M. Stallman <rms@gnu.org>
date Sat, 27 Jul 1996 20:30:31 +0000
parents feeb1f7c1cec
children c741a26258ce
files src/xterm.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Sat Jul 27 20:28:55 1996 +0000
+++ b/src/xterm.c	Sat Jul 27 20:30:31 1996 +0000
@@ -195,6 +195,7 @@
 
 /* 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 @@
 		    && 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;