summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorleviathan <leviathan@lindenlab.com>2026-09-10 08:45:18 -0700
committerleviathan <leviathan@lindenlab.com>2026-10-16 13:14:38 -0700
commit37ffdfbbad2eb8738c521b777d04c7de241bfe9a (patch)
tree3207294a7991a48e09aff8dcb2908c86e7ad43af /indra/newview/llviewerwindow.cpp
parent778f0dc00069534e0d11292178c153ef50e44602 (diff)
clamp cursor mode to Window, not WorldView
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b157fefb01..e31c7495ca 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3560,11 +3560,11 @@ void LLViewerWindow::moveCursorToCenter()
void LLViewerWindow::moveCursorTo(S32 x, S32 y)
{
- // Clamp to the world view so a gamepad-driven cursor (see
- // LLAgent::applyExternalActions()'s CONTROL_MODE_CURSOR handling) can't warp
- // itself off-screen.
- x = llclamp(x, 0, getWorldViewWidthScaled());
- y = llclamp(y, 0, getWorldViewHeightScaled());
+ // Clamp to the whole window (not just the world view) so a gamepad-driven
+ // cursor (see LLAgent::applyExternalActions()'s CONTROL_MODE_CURSOR
+ // handling) can reach the menu bar and toolbars, but not escape the window.
+ x = llclamp(x, 0, getWindowWidthScaled());
+ y = llclamp(y, 0, getWindowHeightScaled());
LLUI::getInstance()->setMousePositionScreen(x, y);