diff options
author | David Robillard <d@drobilla.net> | 2015-02-15 18:26:03 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-02-15 18:26:03 +0000 |
commit | 56ebb4e326314495f242a7615ebf7715d0927c2e (patch) | |
tree | 881a37f96ca050860f222969fe1821dee277682a /src | |
parent | d214e8a02ab5d2e8dbb88b8019915b6246c0530f (diff) | |
download | suil-56ebb4e326314495f242a7615ebf7715d0927c2e.tar.gz suil-56ebb4e326314495f242a7615ebf7715d0927c2e.tar.bz2 suil-56ebb4e326314495f242a7615ebf7715d0927c2e.zip |
Fix mouse wheel on Windows.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5574 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/win_in_gtk2.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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 <gtk/gtk.h> #include <gdk/gdkwin32.h> +#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; } |