summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2018-11-26 18:02:44 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2018-11-26 18:02:44 +0200
commitacc86a9139872e182fbeb5b9fc7daa12c5d2c029 (patch)
tree140e401c78b6c279b699e3e859f7b9d4bfe75873 /indra/llui
parent62085f9f7904aa20406aa4f0122065aec3a786ee (diff)
SL-9766 [Render] [Mac] Alt + left mouse click has severely impaired functions
SL-10019 - [Mac] [Render] Right-click context menu immediately disappears when clicking any place in the ‘Inventory’ floater SL-9984 - [Retina] Camera frustum, do not display correctly on "WORLD MAP" window. SL-10027 - [Mac] [Render] Add toggle for Retina support to mitigate FPS loss Re-FIX for Retina support.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmenugl.cpp3
-rw-r--r--indra/llui/lltooltip.cpp10
-rw-r--r--indra/llui/llui.cpp16
3 files changed, 13 insertions, 16 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 752d4a27e6..0d42f726fa 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3260,8 +3260,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
menu->arrangeAndClear();
LLUI::getMousePositionLocal(menu->getParent(), &mouse_x, &mouse_y);
- F32 dev_scale_factor = LLView::getWindow()->getDeviceScaleFactor();
- LLMenuHolderGL::sContextMenuSpawnPos.set(mouse_x/dev_scale_factor, mouse_y/dev_scale_factor);
+ LLMenuHolderGL::sContextMenuSpawnPos.set(mouse_x,mouse_y);
const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getRect();
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index 7f2224870d..698b128d45 100644
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -489,10 +489,6 @@ void LLToolTipMgr::show(const LLToolTip::Params& params)
return;
}
- S32 mouse_x;
- S32 mouse_y;
- LLUI::getMousePositionLocal(gToolTipView, &mouse_x, &mouse_y);
-
// are we ready to show the tooltip?
if (!mToolTipsBlocked // we haven't hit a key, moved the mouse, etc.
&& LLUI::getMouseIdleTime() > params_with_defaults.delay_time) // the mouse has been still long enough
@@ -574,12 +570,12 @@ void LLToolTipMgr::updateToolTipVisibility()
}
// hide existing tooltips if they have timed out
- S32 mouse_x, mouse_y;
- LLUI::getMousePositionLocal(gToolTipView, &mouse_x, &mouse_y);
-
F32 tooltip_timeout = 0.f;
if (toolTipVisible())
{
+ S32 mouse_x, mouse_y;
+ LLUI::getMousePositionLocal(gToolTipView, &mouse_x, &mouse_y);
+
// mouse far away from tooltip
tooltip_timeout = mLastToolTipParams.visible_time_far;
// mouse near rect will only include the tooltip if the
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 2e9188a6a8..e9f8ba020e 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -236,11 +236,14 @@ void LLUI::dirtyRect(LLRect rect)
//static
void LLUI::setMousePositionScreen(S32 x, S32 y)
{
- F32 dev_scale_factor = LLView::getWindow()->getDeviceScaleFactor();
S32 screen_x, screen_y;
- screen_x = ll_round(((F32)x * getScaleFactor().mV[VX]) / dev_scale_factor);
- screen_y = ll_round(((F32)y * getScaleFactor().mV[VY]) / dev_scale_factor);
-
+#if defined(LL_DARWIN)
+ screen_x = ll_round((F32)x);
+ screen_y = ll_round((F32)y);
+#else
+ screen_x = ll_round((F32)x * getScaleFactor().mV[VX]);
+ screen_y = ll_round((F32)y * getScaleFactor().mV[VY]);
+#endif
LLView::getWindow()->setCursorPosition(LLCoordGL(screen_x, screen_y).convert());
}
@@ -248,11 +251,10 @@ void LLUI::setMousePositionScreen(S32 x, S32 y)
void LLUI::getMousePositionScreen(S32 *x, S32 *y)
{
LLCoordWindow cursor_pos_window;
- F32 dev_scale_factor = LLView::getWindow()->getDeviceScaleFactor();
getWindow()->getCursorPosition(&cursor_pos_window);
LLCoordGL cursor_pos_gl(cursor_pos_window.convert());
- *x = ll_round(((F32)cursor_pos_gl.mX / getScaleFactor().mV[VX]) * dev_scale_factor);
- *y = ll_round(((F32)cursor_pos_gl.mY / getScaleFactor().mV[VX]) * dev_scale_factor);
+ *x = ll_round((F32)cursor_pos_gl.mX / getScaleFactor().mV[VX]);
+ *y = ll_round((F32)cursor_pos_gl.mY / getScaleFactor().mV[VY]);
}
//static