summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-01-29 10:28:17 +0000
committerLynx Linden <lynx@lindenlab.com>2010-01-29 10:28:17 +0000
commit3340f15a10595fac4e28a9587634975c369fe771 (patch)
tree7255ff74c8d02ebe0d6a9520fbc7c014e8224f32 /indra/newview
parentfc8e185fafcfea1ead8b9c064ed38d5ac65f81b6 (diff)
parent540752ff2dcaaf565e8a9dff93079816ef572312 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llviewerwindow.cpp17
2 files changed, 21 insertions, 7 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 1ef79aeec0..f3bda19ed1 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -2377,6 +2377,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>DisableMouseWarp</key>
+ <map>
+ <key>Comment</key>
+ <string>Disable warping of the mouse to the center of the screen during alt-zoom and mouse look. Useful with certain input devices, mouse sharing programs like Synergy, or running under Parallels.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DisableRendering</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b4c73dba26..8692cdcc57 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2269,15 +2269,18 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
void LLViewerWindow::moveCursorToCenter()
{
- S32 x = getWorldViewWidthScaled() / 2;
- S32 y = getWorldViewHeightScaled() / 2;
+ if (! gSavedSettings.getBOOL("DisableMouseWarp"))
+ {
+ S32 x = getWorldViewWidthScaled() / 2;
+ S32 y = getWorldViewHeightScaled() / 2;
- //on a forced move, all deltas get zeroed out to prevent jumping
- mCurrentMousePoint.set(x,y);
- mLastMousePoint.set(x,y);
- mCurrentMouseDelta.set(0,0);
+ //on a forced move, all deltas get zeroed out to prevent jumping
+ mCurrentMousePoint.set(x,y);
+ mLastMousePoint.set(x,y);
+ mCurrentMouseDelta.set(0,0);
- LLUI::setMousePositionScreen(x, y);
+ LLUI::setMousePositionScreen(x, y);
+ }
}