From fc2cdf62f186784548934b64ac4a559c32146614 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Fri, 2 Nov 2018 16:27:34 +0200 Subject: SL-9766 [Render] [Mac] Alt + left mouse click has severely impaired functions FIX #2 --- indra/llui/llui.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 770f13c1c3..2e9188a6a8 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -236,9 +236,10 @@ 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]); - screen_y = ll_round((F32)y * getScaleFactor().mV[VY]); + screen_x = ll_round(((F32)x * getScaleFactor().mV[VX]) / dev_scale_factor); + screen_y = ll_round(((F32)y * getScaleFactor().mV[VY]) / dev_scale_factor); LLView::getWindow()->setCursorPosition(LLCoordGL(screen_x, screen_y).convert()); } @@ -247,10 +248,11 @@ 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]); - *y = ll_round((F32)cursor_pos_gl.mY / getScaleFactor().mV[VX]); + *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); } //static -- cgit v1.2.3 From 755b4a3a6dc6c158f7cfcd6ab8d88b38d3b79fb4 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Thu, 8 Nov 2018 18:33:42 +0200 Subject: =?UTF-8?q?SL-10019=20-=20[Mac]=20[Render]=20Right-click=20context?= =?UTF-8?q?=20menu=20immediately=20disappears=20when=20clicking=20any=20pl?= =?UTF-8?q?ace=20in=20the=20=E2=80=98Inventory=E2=80=99=20floater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/llui/llmenugl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 0d42f726fa..752d4a27e6 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3260,7 +3260,8 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) menu->arrangeAndClear(); LLUI::getMousePositionLocal(menu->getParent(), &mouse_x, &mouse_y); - LLMenuHolderGL::sContextMenuSpawnPos.set(mouse_x,mouse_y); + F32 dev_scale_factor = LLView::getWindow()->getDeviceScaleFactor(); + LLMenuHolderGL::sContextMenuSpawnPos.set(mouse_x/dev_scale_factor, mouse_y/dev_scale_factor); const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getRect(); -- cgit v1.2.3 From acc86a9139872e182fbeb5b9fc7daa12c5d2c029 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 26 Nov 2018 18:02:44 +0200 Subject: =?UTF-8?q?SL-9766=20[Render]=20[Mac]=20Alt=20+=20left=20mouse=20c?= =?UTF-8?q?lick=20has=20severely=20impaired=20functions=20SL-10019=20-=20[?= =?UTF-8?q?Mac]=20[Render]=20Right-click=20context=20menu=20immediately=20?= =?UTF-8?q?disappears=20when=20clicking=20any=20place=20in=20the=20?= =?UTF-8?q?=E2=80=98Inventory=E2=80=99=20floater=20SL-9984=20-=20[Retina]?= =?UTF-8?q?=20Camera=20frustum,=20do=20not=20display=20correctly=20on=20"W?= =?UTF-8?q?ORLD=20MAP"=20window.=20SL-10027=20-=20[Mac]=20[Render]=20Add?= =?UTF-8?q?=20toggle=20for=20Retina=20support=20to=20mitigate=20FPS=20loss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-FIX for Retina support. --- indra/llui/llmenugl.cpp | 3 +-- indra/llui/lltooltip.cpp | 10 +++------- indra/llui/llui.cpp | 16 +++++++++------- 3 files changed, 13 insertions(+), 16 deletions(-) (limited to 'indra/llui') 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 -- cgit v1.2.3 From 07f380d61a8f939e672dd1b07cc871dc799bdbc2 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 3 Apr 2019 08:47:44 -0700 Subject: Fix random Xcode 10.2 failures from unused vars and references to local objects. Modified llwindowmacosx to pass some things by value instead. --- indra/llui/lllayoutstack.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 69246a2f57..ce8dbb1f66 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -510,7 +510,6 @@ LLLayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const { if (!panelp) return NULL; - e_panel_list_t::const_iterator panel_it; BOOST_FOREACH(LLLayoutPanel* p, mPanels) { if (p == panelp) -- cgit v1.2.3