summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 3554f90be8..d9b95d311a 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -417,7 +417,7 @@ void callDeltaUpdate(float *delta, MASK mask)
gWindowImplementation->updateMouseDeltas(delta);
}
-void callMiddleMouseDown(float *pos, MASK mask)
+void callOtherMouseDown(float *pos, MASK mask, int button)
{
LLCoordGL outCoords;
outCoords.mX = ll_round(pos[0]);
@@ -426,10 +426,18 @@ void callMiddleMouseDown(float *pos, MASK mask)
gWindowImplementation->getMouseDeltas(deltas);
outCoords.mX += deltas[0];
outCoords.mY += deltas[1];
- gWindowImplementation->getCallbacks()->handleMiddleMouseDown(gWindowImplementation, outCoords, mask);
+
+ if (button == 2)
+ {
+ gWindowImplementation->getCallbacks()->handleMiddleMouseDown(gWindowImplementation, outCoords, mask);
+ }
+ else
+ {
+ gWindowImplementation->getCallbacks()->handleOtherMouseDown(gWindowImplementation, outCoords, mask, button + 1);
+ }
}
-void callMiddleMouseUp(float *pos, MASK mask)
+void callOtherMouseUp(float *pos, MASK mask, int button)
{
LLCoordGL outCoords;
outCoords.mX = ll_round(pos[0]);
@@ -437,8 +445,15 @@ void callMiddleMouseUp(float *pos, MASK mask)
float deltas[2];
gWindowImplementation->getMouseDeltas(deltas);
outCoords.mX += deltas[0];
- outCoords.mY += deltas[1];
- gWindowImplementation->getCallbacks()->handleMiddleMouseUp(gWindowImplementation, outCoords, mask);
+ outCoords.mY += deltas[1];
+ if (button == 2)
+ {
+ gWindowImplementation->getCallbacks()->handleMiddleMouseUp(gWindowImplementation, outCoords, mask);
+ }
+ else
+ {
+ gWindowImplementation->getCallbacks()->handleOtherMouseUp(gWindowImplementation, outCoords, mask, button + 1);
+ }
}
void callModifier(MASK mask)