Commit c0e0a150 authored by LRN's avatar LRN

W32: Support horizontal mouse wheel scrolling

https://bugzilla.gnome.org/show_bug.cgi?id=748014
parent bbac0eb3
......@@ -2450,6 +2450,7 @@ gdk_event_translate (MSG *msg,
break;
case WM_MOUSEWHEEL:
case WM_MOUSEHWHEEL:
GDK_NOTE (EVENTS, g_print (" %d", (short) HIWORD (msg->wParam)));
/* WM_MOUSEWHEEL is delivered to the focus window. Work around
......@@ -2500,8 +2501,13 @@ gdk_event_translate (MSG *msg,
event = gdk_event_new (GDK_SCROLL);
event->scroll.window = window;
event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ?
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
if (msg->message == WM_MOUSEWHEEL)
event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ?
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
else if (msg->message == WM_MOUSEHWHEEL)
event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ?
GDK_SCROLL_RIGHT : GDK_SCROLL_LEFT;
event->scroll.time = _gdk_win32_get_next_tick (msg->time);
event->scroll.x = (gint16) point.x;
event->scroll.y = (gint16) point.y;
......
......@@ -759,6 +759,7 @@ _gdk_win32_message_to_string (UINT msg)
CASE (WM_MBUTTONUP);
CASE (WM_MBUTTONDBLCLK);
CASE (WM_MOUSEWHEEL);
CASE (WM_MOUSEHWHEEL);
CASE (WM_XBUTTONDOWN);
CASE (WM_XBUTTONUP);
CASE (WM_XBUTTONDBLCLK);
......
......@@ -90,6 +90,9 @@
#ifndef WM_APPCOMMAND
#define WM_APPCOMMAND 0x319
#endif
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x20E
#endif
#ifndef CF_DIBV5
#define CF_DIBV5 17
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment