+#if GTK_CHECK_VERSION(3,4,0)
+ if (gdk_event->direction == GDK_SCROLL_SMOOTH)
+ {
+ bool processed_x = false;
+ if (gdk_event->delta_x)
+ {
+ event.m_wheelAxis = wxMOUSE_WHEEL_HORIZONTAL;
+ event.m_wheelRotation = int(event.m_wheelDelta * gdk_event->delta_x);
+ GtkRange* range = win->m_scrollBar[wxWindow::ScrollDir_Horz];
+ event.m_linesPerAction = GetWheelScrollActionDelta(range);
+ event.m_columnsPerAction = event.m_linesPerAction;
+ processed_x = win->GTKProcessEvent(event);
+ }
+ bool processed_y = false;
+ if (gdk_event->delta_y)
+ {
+ event.m_wheelAxis = wxMOUSE_WHEEL_VERTICAL;
+ event.m_wheelRotation = int(event.m_wheelDelta * gdk_event->delta_y);
+ GtkRange* range = win->m_scrollBar[wxWindow::ScrollDir_Vert];
+ event.m_linesPerAction = GetWheelScrollActionDelta(range);
+ event.m_columnsPerAction = event.m_linesPerAction;
+ processed_y = win->GTKProcessEvent(event);
+ }
+ return processed_x || processed_y;
+ }
+#endif // GTK_CHECK_VERSION(3,4,0)