summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-12-09 20:50:57 +0800
committerErik Kundiman <erik@megapahit.org>2023-12-09 20:50:57 +0800
commit07d5175489a3adbca6e9549e890ebf957dd6e638 (patch)
treef6d9bf6c23225b6bc208b71ebda3cf0af379ddeb /indra
parent92f8753dfc4af93448f2b12115de4d4d9a583233 (diff)
Fix alt dragging when not in full screen
Diffstat (limited to 'indra')
-rw-r--r--indra/llwindow/llwindowsdl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index cb53c28265..8410c4c891 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -1130,7 +1130,10 @@ BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position)
//LL_INFOS() << "setCursorPosition(" << screen_pos.mX << ", " << screen_pos.mY << ")" << LL_ENDL;
// do the actual forced cursor move.
- SDL_WarpMouseGlobal(screen_pos.mX, screen_pos.mY);
+ if (mFullscreen)
+ SDL_WarpMouseGlobal(screen_pos.mX, screen_pos.mY);
+ else
+ SDL_WarpMouseInWindow(mWindow, screen_pos.mX, screen_pos.mY);
//LL_INFOS() << llformat("llcw %d,%d -> scr %d,%d", position.mX, position.mY, screen_pos.mX, screen_pos.mY) << LL_ENDL;