changeset 21875:16414f4d07e7

(msh_mousewheel): Declare. (w32_read_socket): Check for mousewheel events.
author Geoff Voelker <voelker@cs.washington.edu>
date Thu, 30 Apr 1998 17:20:53 +0000
parents c0871d40073e
children 52ebc509a367
files src/w32term.c
diffstat 1 files changed, 27 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.c	Thu Apr 30 17:19:55 1998 +0000
+++ b/src/w32term.c	Thu Apr 30 17:20:53 1998 +0000
@@ -55,6 +55,8 @@
 #define min(x, y) (((x) < (y)) ? (x) : (y))
 #define max(x, y) (((x) > (y)) ? (x) : (y))
 
+extern unsigned int msh_mousewheel;
+
 extern void free_frame_menubar ();
 
 extern Lisp_Object Vwindow_system;
@@ -3205,6 +3207,31 @@
 	  
 	  check_visibility = 1;
 	  break;
+
+	default:
+	  /* Check for messages registered at runtime. */
+	  if (msg.msg.message == msh_mousewheel)
+	    {
+	      if (dpyinfo->grabbed && last_mouse_frame 
+		  && FRAME_LIVE_P (last_mouse_frame))
+		f = last_mouse_frame;
+	      else
+		f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
+          
+	      if (f)
+		{
+		  if ((!dpyinfo->w32_focus_frame 
+		       || f == dpyinfo->w32_focus_frame)
+		      && (numchars >= 1))
+		    {
+		      construct_mouse_wheel (bufp, &msg, f);
+		      bufp++;
+		      count++;
+		      numchars--;
+		    }
+		}
+	    }
+	  break;
 	}
     }