clutter-event-win32: Emit multiple events for WM_MOUSEWHEEL Messages
It's possible that a single WM_MOUSEWHEEL event can arrive with a scroll amount greater than WHEEL_DELTA. Previously it would accumulate these amounts but it would still only emit a single event per message. For example, if a message arrived that is worth two WHEEL_DELTAs then it would emit one event and leave scroll_pos as +WHEEL_DELTA. If the wheel is then scrolled in the opposite direction then wheel delta would end up as zero and the scroll event would get lost. This patch fixes it so that it always emits enough events to put scroll_pos back to less than WHEEL_DELTA. http://bugzilla.clutter-project.org/show_bug.cgi?id=2135
This commit is contained in:
parent
2c8d73f047
commit
527ad961ab
@ -504,7 +504,7 @@ message_translate (ClutterBackend *backend,
|
||||
case WM_MOUSEWHEEL:
|
||||
stage_win32->scroll_pos += (SHORT) HIWORD (msg->wParam);
|
||||
|
||||
if (abs (stage_win32->scroll_pos) >= WHEEL_DELTA)
|
||||
while (abs (stage_win32->scroll_pos) >= WHEEL_DELTA)
|
||||
{
|
||||
ClutterEvent *event = clutter_event_new (CLUTTER_SCROLL);
|
||||
POINT pt;
|
||||
|
Loading…
Reference in New Issue
Block a user