From 56ebb4e326314495f242a7615ebf7715d0927c2e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 15 Feb 2015 18:26:03 +0000 Subject: Fix mouse wheel on Windows. git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5574 a436a847-0d15-0410-975c-d299462d15a1 --- src/win_in_gtk2.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/win_in_gtk2.cpp b/src/win_in_gtk2.cpp index e702d85..4cc19c1 100644 --- a/src/win_in_gtk2.cpp +++ b/src/win_in_gtk2.cpp @@ -19,6 +19,13 @@ #include #include +#ifndef WM_MOUSEWHEEL +# define WM_MOUSEWHEEL 0x020A +#endif +#ifndef WM_MOUSEHWHEEL +# define WM_MOUSEHWHEEL 0x020E +#endif + #include "./suil_internal.h" #ifdef HAVE_LV2_1_6_0 @@ -159,6 +166,11 @@ event_filter(GdkXEvent* xevent, GdkEvent* event, gpointer data) // Forward keyboard events to UI window PostMessage((HWND)wrap->instance->ui_widget, msg->message, msg->wParam, msg->lParam); + return GDK_FILTER_REMOVE; + } else if (msg->message == WM_MOUSEWHEEL || msg->message == WM_MOUSEHWHEEL) { + PostMessage((HWND)wrap->instance->ui_widget, + msg->message, msg->wParam, msg->lParam); + return GDK_FILTER_REMOVE; } return GDK_FILTER_CONTINUE; } -- cgit v1.2.1