<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">[PATCH] Fix mousewheel handling in X

We may want to make the buttons configurable in the future, but this will be
correct for the vast majority of the time.

diff -urN b/common/gl_vidlinuxglx.c head/common/gl_vidlinuxglx.c
--- b/common/gl_vidlinuxglx.c	2005-12-11 22:21:02.000000000 +1030
+++ head/common/gl_vidlinuxglx.c	2005-12-27 17:00:54.000000000 +1030
@@ -394,6 +394,10 @@
 		Key_Event(K_MOUSE3, true);
 	    else if (event.xbutton.button == 3)
 		Key_Event(K_MOUSE2, true);
+	    else if (event.xbutton.button == 4)
+		Key_Event(K_MWHEELUP, true);
+	    else if (event.xbutton.button == 5)
+		Key_Event(K_MWHEELDOWN, true);
 	    break;
 
 	case ButtonRelease:
@@ -403,6 +407,10 @@
 		Key_Event(K_MOUSE3, false);
 	    else if (event.xbutton.button == 3)
 		Key_Event(K_MOUSE2, false);
+	    else if (event.xbutton.button == 4)
+		Key_Event(K_MWHEELUP, false);
+	    else if (event.xbutton.button == 5)
+		Key_Event(K_MWHEELDOWN, false);
 	    break;
 
 	case CreateNotify:
</pre></body></html>