shithub: drawterm-fdroid

Download patch

ref: 911a007cb62b74f4e3a30429a7fabc11d2075bb5
parent: 047ad2e07d297c0747555e2fa1f98976e1529311
author: aiju <devnull@localhost>
date: Sat Jul 7 06:09:00 EDT 2018

add mousewheel to cocoa drawterm (thanks Steven McDonald)

--- a/gui-cocoa/screen.m
+++ b/gui-cocoa/screen.m
@@ -212,6 +212,7 @@
 - (void) otherMouseDown:(NSEvent*)event;
 - (void) otherMouseDragged:(NSEvent*)event;
 - (void) otherMouseUp:(NSEvent*)event;
+- (void) scrollWheel:(NSEvent*)event;                                                                                                                                                                                                                                                                                                                                                                                                   
 - (BOOL) acceptsFirstResponder;
 - (void) reshape;
 - (BOOL) acceptsMouseMovedEvents;
@@ -405,6 +406,10 @@
 - (void) otherMouseDown:(NSEvent*)event { [self mouseevent:event]; }
 - (void) otherMouseDragged:(NSEvent*)event { [self mouseevent:event]; }
 - (void) otherMouseUp:(NSEvent*)event { [self mouseevent:event]; }
+
+- (void) scrollWheel:(NSEvent*)event {
+	mousetrack(0, 0, [event deltaY]>0 ? 8 : 16, ticks());
+}
 
 - (BOOL) acceptsFirstResponder {
 	return TRUE;