summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2025-10-02 15:01:50 -0400
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2025-10-02 15:01:50 -0400
commit18c84a9d6ad2381836a0c8263a8e9cb800b6c28e (patch)
tree6410603aa44e66f726aebe030ecfa31d37db1f68 /indra/llwindow/llwindowmacosx.cpp
parentf25c2a56c0c8079163e9ef18f6a9e590341b1e1a (diff)
parent6dba35d74e27125b39860f9a3df176d7f3a087b5 (diff)
Merge branch 'release/2025.07' into project/lua_editor
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp29
1 files changed, 20 insertions, 9 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index dadbc83f45..030bd5ee7e 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -985,7 +985,7 @@ bool LLWindowMacOSX::getPosition(LLCoordScreen *position)
}
else if(mWindow)
{
- const CGPoint & pos = getContentViewBoundsPosition(mWindow);
+ CGPoint pos = getContentViewRect(mWindow).origin;
position->mX = pos.x;
position->mY = pos.y;
@@ -1012,7 +1012,7 @@ bool LLWindowMacOSX::getSize(LLCoordScreen *size)
}
else if(mWindow)
{
- const CGSize & sz = gHiDPISupport ? getDeviceContentViewSize(mWindow, mGLView) : getContentViewBoundsSize(mWindow);
+ CGSize sz = getBackingViewRect(mWindow, mGLView).size;
size->mX = sz.width;
size->mY = sz.height;
@@ -1038,7 +1038,7 @@ bool LLWindowMacOSX::getSize(LLCoordWindow *size)
}
else if(mWindow)
{
- const CGSize & sz = gHiDPISupport ? getDeviceContentViewSize(mWindow, mGLView) : getContentViewBoundsSize(mWindow);
+ CGSize sz = getBackingViewRect(mWindow, mGLView).size;
size->mX = sz.width;
size->mY = sz.height;
@@ -1224,6 +1224,12 @@ void LLWindowMacOSX::setMouseClipping( bool b )
adjustCursorDecouple();
}
+#if LL_DARWIN
+// For CGSetLocalEventsSuppressionInterval there is no replacement in modern API
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
bool LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)
{
bool result = false;
@@ -1261,6 +1267,10 @@ bool LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)
return result;
}
+#if LL_DARWIN
+#pragma clang diagnostic pop
+#endif
+
bool LLWindowMacOSX::getCursorPosition(LLCoordWindow *position)
{
float cursor_point[2];
@@ -1485,8 +1495,9 @@ bool LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordWindow* to)
convertScreenToWindow(mWindow, mouse_point);
- to->mX = mouse_point[0];
- to->mY = mouse_point[1];
+ float scale_factor = getSystemUISize();
+ to->mX = mouse_point[0] * scale_factor;
+ to->mY = mouse_point[1] * scale_factor;
return true;
}
@@ -1498,9 +1509,9 @@ bool LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordScreen *to)
if(mWindow)
{
float mouse_point[2];
-
- mouse_point[0] = from.mX;
- mouse_point[1] = from.mY;
+ float scale_factor = getSystemUISize();
+ mouse_point[0] = from.mX / scale_factor;
+ mouse_point[1] = from.mY / scale_factor;
convertWindowToScreen(mWindow, mouse_point);
@@ -2637,7 +2648,7 @@ MASK LLWindowMacOSX::modifiersToMask(S16 modifiers)
F32 LLWindowMacOSX::getSystemUISize()
{
- return gHiDPISupport ? ::getDeviceUnitSize(mGLView) : LLWindow::getSystemUISize();
+ return ::getDeviceUnitSize(mGLView);
}
#if LL_OS_DRAGDROP_ENABLED