summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/win_in_gtk2.cpp12
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;
}