Commit 73728814 authored by Patrick Storz's avatar Patrick Storz Committed by LRN

GDK W32: fix direction of horizontal smooth scrolling events

Commit 359df028 changed the
code to send GDK_SCROLL_SMOOTH with deltas instead of

Windows defines deltas inversed for vertical direction
(positive values mean the wheel was turned forward)
but not for horizontal direction
(positive values mean the wheel was turned towards the right).

This commit fixes behavior as both axes were inverted previously.
parent d4098099
......@@ -2736,10 +2736,9 @@ gdk_event_translate (MSG *msg,
if (SystemParametersInfo (SPI_GETWHEELSCROLLCHARS, 0, &chars_multiplier, 0))
event->scroll.delta_x *= (gdouble) chars_multiplier;
/* It seems that delta values given by Windows are
* inverted (positive delta scrolls up, not down).
/* Positive delta scrolls up, not down,
see API documentation for WM_MOUSEWHEEL message.
event->scroll.delta_x *= -1.0;
event->scroll.delta_y *= -1.0;
event->scroll.time = _gdk_win32_get_next_tick (msg->time);
event->scroll.x = (gint16) point.x / impl->surface_scale;
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