From 13899bc14ce76042d4956a7661955338717d6813 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 4 Sep 2007 21:42:39 +0000 Subject: [PATCH] (discard_mouse_events): Discard it. (make_lispy_event): Translate it to a lisp event. (lispy_wheel_names): Add wheel-left and right events. (syms_of_keyboard): Enlarge wheel_syms. --- src/keyboard.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 635db1eb597..581975afc58 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4026,6 +4026,7 @@ discard_mouse_events () if (sp->kind == MOUSE_CLICK_EVENT || sp->kind == WHEEL_EVENT + || sp->kind == HORIZ_WHEEL_EVENT #ifdef WINDOWSNT || sp->kind == W32_SCROLL_BAR_CLICK_EVENT #endif @@ -5204,7 +5205,7 @@ Lisp_Object Vlispy_mouse_stem; static char *lispy_wheel_names[] = { - "wheel-up", "wheel-down" + "wheel-up", "wheel-down", "wheel-left", "wheel-right" }; /* drag-n-drop events are generated when a set of selected files are @@ -5841,6 +5842,7 @@ make_lispy_event (event) } case WHEEL_EVENT: + case HORIZ_WHEEL_EVENT: { Lisp_Object position; Lisp_Object head; @@ -5925,6 +5927,9 @@ make_lispy_event (event) the up_modifier set. */ abort (); + if (event->kind == HORIZ_WHEEL_EVENT) + symbol_num += 2; + /* Get the symbol we should use for the wheel event. */ head = modify_event_symbol (symbol_num, event->modifiers, @@ -11800,7 +11805,7 @@ syms_of_keyboard () staticpro (&button_down_location); mouse_syms = Fmake_vector (make_number (1), Qnil); staticpro (&mouse_syms); - wheel_syms = Fmake_vector (make_number (2), Qnil); + wheel_syms = Fmake_vector (make_number (4), Qnil); staticpro (&wheel_syms); { -- 2.39.5