diff options
author | David Seikel | 2011-03-20 17:02:40 +1000 |
---|---|---|
committer | David Seikel | 2011-03-20 17:02:40 +1000 |
commit | 8c15fcec590c68337b8aa05d17793cd3c2a48068 (patch) | |
tree | e233ecfa79c6fe22f47dc0eba44c0300dc0daa71 /linden/indra/llwindow/llwindowmacosx.cpp | |
parent | The half arsed IRC support was broken. It's still not working, though it wor... (diff) | |
parent | Merge remote-tracking branch 'jacek/exp' into exp (diff) | |
download | meta-impy-8c15fcec590c68337b8aa05d17793cd3c2a48068.zip meta-impy-8c15fcec590c68337b8aa05d17793cd3c2a48068.tar.gz meta-impy-8c15fcec590c68337b8aa05d17793cd3c2a48068.tar.bz2 meta-impy-8c15fcec590c68337b8aa05d17793cd3c2a48068.tar.xz |
Merge remote-tracking branch 'mccabe/exp' into weekly
Conflicts: (Keeping these around as a record, there was some strangeness.
.gitignore
linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
linden/indra/newview/llfloaterregioninfo.cpp
linden/indra/newview/llfloatertos.cpp
linden/indra/newview/llpanellogin.cpp
linden/indra/newview/skins/default/html/en-us/loading-error/index.html
linden/indra/newview/skins/default/html/en-us/loading/loading.html
linden/indra/newview/skins/default/xui/en-us/floater_about.xml
linden/install.xml
Diffstat (limited to 'linden/indra/llwindow/llwindowmacosx.cpp')
-rw-r--r-- | linden/indra/llwindow/llwindowmacosx.cpp | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/linden/indra/llwindow/llwindowmacosx.cpp b/linden/indra/llwindow/llwindowmacosx.cpp index 9cbc949..8f8f019 100644 --- a/linden/indra/llwindow/llwindowmacosx.cpp +++ b/linden/indra/llwindow/llwindowmacosx.cpp | |||
@@ -2384,6 +2384,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e | |||
2384 | HIPoint location = {0.0f, 0.0f}; | 2384 | HIPoint location = {0.0f, 0.0f}; |
2385 | UInt32 modifiers = 0; | 2385 | UInt32 modifiers = 0; |
2386 | UInt32 clickCount = 1; | 2386 | UInt32 clickCount = 1; |
2387 | EventMouseWheelAxis wheelAxis = kEventMouseWheelAxisX; | ||
2387 | long wheelDelta = 0; | 2388 | long wheelDelta = 0; |
2388 | LLCoordScreen inCoords; | 2389 | LLCoordScreen inCoords; |
2389 | LLCoordGL outCoords; | 2390 | LLCoordGL outCoords; |
@@ -2393,6 +2394,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e | |||
2393 | GetEventParameter(event, kEventParamMouseLocation, typeHIPoint, NULL, sizeof(location), NULL, &location); | 2394 | GetEventParameter(event, kEventParamMouseLocation, typeHIPoint, NULL, sizeof(location), NULL, &location); |
2394 | GetEventParameter(event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(modifiers), NULL, &modifiers); | 2395 | GetEventParameter(event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(modifiers), NULL, &modifiers); |
2395 | GetEventParameter(event, kEventParamMouseWheelDelta, typeLongInteger, NULL, sizeof(wheelDelta), NULL, &wheelDelta); | 2396 | GetEventParameter(event, kEventParamMouseWheelDelta, typeLongInteger, NULL, sizeof(wheelDelta), NULL, &wheelDelta); |
2397 | GetEventParameter(event, kEventParamMouseWheelAxis, typeMouseWheelAxis, NULL, sizeof(wheelAxis), NULL, &wheelAxis); | ||
2396 | GetEventParameter(event, kEventParamClickCount, typeUInt32, NULL, sizeof(clickCount), NULL, &clickCount); | 2398 | GetEventParameter(event, kEventParamClickCount, typeUInt32, NULL, sizeof(clickCount), NULL, &clickCount); |
2397 | 2399 | ||
2398 | inCoords.mX = llround(location.x); | 2400 | inCoords.mX = llround(location.x); |
@@ -2501,14 +2503,31 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e | |||
2501 | 2503 | ||
2502 | case kEventMouseWheelMoved: | 2504 | case kEventMouseWheelMoved: |
2503 | { | 2505 | { |
2504 | static S32 z_delta = 0; | 2506 | switch (wheelAxis){ |
2507 | case kEventMouseWheelAxisX: | ||
2505 | 2508 | ||
2506 | z_delta += wheelDelta; | 2509 | static S32 wheel_x_delta = 0; |
2507 | 2510 | ||
2508 | if (z_delta <= -WHEEL_DELTA || WHEEL_DELTA <= z_delta) | 2511 | wheel_x_delta += wheelDelta; |
2509 | { | 2512 | |
2510 | mCallbacks->handleScrollWheel(this, -z_delta / WHEEL_DELTA); | 2513 | if (wheel_x_delta <= -WHEEL_DELTA || WHEEL_DELTA <= wheel_x_delta) |
2511 | z_delta = 0; | 2514 | { |
2515 | mCallbacks->handleHScrollWheel(this, wheel_x_delta / WHEEL_DELTA); | ||
2516 | wheel_x_delta = 0; | ||
2517 | } | ||
2518 | break; | ||
2519 | case kEventMouseWheelAxisY: | ||
2520 | |||
2521 | static S32 wheel_y_delta = 0; | ||
2522 | |||
2523 | wheel_y_delta += wheelDelta; | ||
2524 | |||
2525 | if (wheel_y_delta <= -WHEEL_DELTA || WHEEL_DELTA <= wheel_y_delta) | ||
2526 | { | ||
2527 | mCallbacks->handleScrollWheel(this, -wheel_y_delta / WHEEL_DELTA); | ||
2528 | wheel_y_delta = 0; | ||
2529 | } | ||
2530 | break; | ||
2512 | } | 2531 | } |
2513 | } | 2532 | } |
2514 | result = noErr; | 2533 | result = noErr; |