From 37ffdfbbad2eb8738c521b777d04c7de241bfe9a Mon Sep 17 00:00:00 2001 From: leviathan Date: Thu, 10 Sep 2026 08:45:18 -0700 Subject: clamp cursor mode to Window, not WorldView --- indra/newview/llviewerwindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') 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); -- cgit v1.3