From 56060218c3f542b28eaf305b42ecdd52e282cb59 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 19 Sep 2016 12:11:39 +0300 Subject: [PATCH 1/9] MAINT-6733 FIXED On build disabled land, the build button is enabled when left clicking any touchable object. --- indra/newview/lltoolmgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index b0e3b5bf89..f6eb290bc3 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -267,7 +267,7 @@ bool LLToolMgr::canEdit() bool LLToolMgr::buildEnabledOrActive() { - return inEdit() || canEdit(); + return LLFloaterReg::instanceVisible("build") || canEdit(); } void LLToolMgr::toggleBuildMode(const LLSD& sdname) From e638f635c81d2b380840e33acdc33ee692422153 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 20 Sep 2016 16:45:42 +0300 Subject: [PATCH 2/9] MAINT-6735 Teleport offer sound does not play when the the destination region's maturity exceeds the current maturity settings --- indra/newview/llnotificationofferhandler.cpp | 24 +++++++++++-------- .../skins/default/xui/en/notifications.xml | 6 +++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 2657b84ef3..c29fdecefa 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -96,17 +96,21 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) LLUUID from_id = notification->getPayload()["from_id"]; - //Will not play a notification sound for inventory and teleport offer based upon chat preference - bool playSound = (!notification->isDND() - && ((notification->getName() == "UserGiveItem" - && gSavedSettings.getBOOL("PlaySoundInventoryOffer")) - || (notification->getName() == "TeleportOffered" - && gSavedSettings.getBOOL("PlaySoundTeleportOffer")))); + if (!notification->isDND()) + { + //Will not play a notification sound for inventory and teleport offer based upon chat preference + bool playSound = (notification->getName() == "UserGiveItem" + && gSavedSettings.getBOOL("PlaySoundInventoryOffer") + || ((notification->getName() == "TeleportOffered" + || notification->getName() == "TeleportOffered_MaturityExceeded" + || notification->getName() == "TeleportOffered_MaturityBlocked") + && gSavedSettings.getBOOL("PlaySoundTeleportOffer"))); - if(playSound) - { - notification->playSound(); - } + if (playSound) + { + notification->playSound(); + } + } LLHandlerUtil::spawnIMSession(name, from_id); LLHandlerUtil::addNotifPanelToIM(notification); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 3fe21a261c..79ee35fe3e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7407,7 +7407,8 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th name="TeleportOffered_MaturityExceeded" log_to_im="true" log_to_chat="false" - type="offer"> + type="offer" + sound="UISndNewIncomingIMSession"> [NAME_SLURL] has offered to teleport you to their location: “[MESSAGE]” @@ -7432,7 +7433,8 @@ This region contains [REGION_CONTENT_MATURITY] content, but your current prefere name="TeleportOffered_MaturityBlocked" log_to_im="true" log_to_chat="false" - type="notifytip"> + type="notifytip" + sound="UISndNewIncomingIMSession"> [NAME_SLURL] has offered to teleport you to their location: “[MESSAGE]” From c9cfa897d9a781b6781915d250bb8886c206cd3f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 20 Sep 2016 17:47:30 +0300 Subject: [PATCH 3/9] MAINT-6655 fixed group list and inspector not always switching to default icon --- indra/newview/llgrouplist.cpp | 5 +---- indra/newview/llinspectgroup.cpp | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 6126db2988..62414d3bbb 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -379,10 +379,7 @@ void LLGroupListItem::setGroupID(const LLUUID& group_id) void LLGroupListItem::setGroupIconID(const LLUUID& group_icon_id) { - if (group_icon_id.notNull()) - { - mGroupIcon->setIconId(group_icon_id); - } + mGroupIcon->setIconId(group_icon_id); } void LLGroupListItem::setGroupIconVisible(bool visible) diff --git a/indra/newview/llinspectgroup.cpp b/indra/newview/llinspectgroup.cpp index 0c5a91e48a..a4fce36783 100644 --- a/indra/newview/llinspectgroup.cpp +++ b/indra/newview/llinspectgroup.cpp @@ -41,6 +41,7 @@ #include "lltooltip.h" // positionViewNearMouse() #include "lltrans.h" #include "lluictrl.h" +#include "llgroupiconctrl.h" ////////////////////////////////////////////////////////////////////////////// // LLInspectGroup @@ -233,8 +234,7 @@ void LLInspectGroup::processGroupData() getChild("group_details")->setValue( LLSD(data->mCharter) ); - // LLGroupIconCtrl - getChild("group_icon")->setValue(LLSD(mGroupID)); + getChild("group_icon")->setIconId(data->mInsigniaID); std::string cost; bool is_member = LLGroupActions::isInGroup(mGroupID); From 6e3acac4f0b47ee721f2e577484906de0240d76d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 20 Sep 2016 20:42:57 +0300 Subject: [PATCH 4/9] MAINT-6735 brackets fix --- indra/newview/llnotificationofferhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index c29fdecefa..63ab88da42 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -100,11 +100,11 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) { //Will not play a notification sound for inventory and teleport offer based upon chat preference bool playSound = (notification->getName() == "UserGiveItem" - && gSavedSettings.getBOOL("PlaySoundInventoryOffer") + && gSavedSettings.getBOOL("PlaySoundInventoryOffer")) || ((notification->getName() == "TeleportOffered" || notification->getName() == "TeleportOffered_MaturityExceeded" || notification->getName() == "TeleportOffered_MaturityBlocked") - && gSavedSettings.getBOOL("PlaySoundTeleportOffer"))); + && gSavedSettings.getBOOL("PlaySoundTeleportOffer")); if (playSound) { From bb7cbe7cff43bec7061a7a0ccabaf2755e7376ee Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Sep 2016 21:16:39 +0200 Subject: [PATCH 5/9] Small improvements to UI DPI scaling on Windows: * Use USER_DEFAULT_SCREEN_DPI define from WinUser.h * Change Win32 SDK target version to Windows Vista or greater * Define WM_DPICHANGED as preprocessor definition as in WinUser.h * Cull manual definitions of WM_MOUSEWHEEL and WHEEL_DELTA which are part of the Win32 SDK since Windows NT 4.0 --- indra/cmake/00-Common.cmake | 4 ++-- indra/llwindow/llwindowwin32.cpp | 18 +++++------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 86fc2dfff5..adc134c48c 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -83,8 +83,8 @@ if (WINDOWS) add_definitions(/WX) endif (NOT VS_DISABLE_FATAL_WARNINGS) - # configure win32 API for windows XP+ compatibility - set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)") + # configure Win32 API for Windows Vista+ compatibility + set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)") add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}") endif (WINDOWS) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 26bc819aab..4086db8e52 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -60,21 +60,13 @@ #include #include -// culled from winuser.h -#ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */ -const S32 WM_MOUSEWHEEL = 0x020A; -#endif -#ifndef WHEEL_DELTA /* Added to be compatible with later SDK's */ -const S32 WHEEL_DELTA = 120; /* Value for rolling one detent */ -#endif const S32 MAX_MESSAGE_PER_UPDATE = 20; const S32 BITS_PER_PIXEL = 32; const S32 MAX_NUM_RESOLUTIONS = 32; const F32 ICON_FLASH_TIME = 0.5f; -const F32 DEFAULT_DPI = 96.0f; -#ifndef WM_DPICHANGED -const S32 WM_DPICHANGED = 0x02E0; +#ifndef WM_DPICHANGED +#define WM_DPICHANGED 0x02E0 #endif extern BOOL gDebugWindowProc; @@ -2631,7 +2623,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_DPICHANGED: { LPRECT lprc_new_scale; - F32 new_scale = LOWORD(w_param) / 96.0f; + F32 new_scale = LOWORD(w_param) / USER_DEFAULT_SCREEN_DPI; lprc_new_scale = (LPRECT)l_param; S32 new_width = lprc_new_scale->right - lprc_new_scale->left; S32 new_height = lprc_new_scale->bottom - lprc_new_scale->top; @@ -3990,7 +3982,7 @@ F32 LLWindowWin32::getSystemUISize() hr = pGDFM(hMonitor, MDT_EFFECTIVE_DPI, &dpix, &dpiy); if (hr == S_OK) { - scale_value = dpix / DEFAULT_DPI; + scale_value = dpix / USER_DEFAULT_SCREEN_DPI; } else { @@ -4009,7 +4001,7 @@ F32 LLWindowWin32::getSystemUISize() else { LL_WARNS() << "Could not load shcore.dll library (included by from Win 8.1 SDK). Using legacy DPI awareness API of Win XP/7" << LL_ENDL; - scale_value = GetDeviceCaps(hdc, LOGPIXELSX) / DEFAULT_DPI; + scale_value = GetDeviceCaps(hdc, LOGPIXELSX) / USER_DEFAULT_SCREEN_DPI; } ReleaseDC(hWnd, hdc); From 5b61515ca34dfb6bc84fea019f48a47be76c1b5f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 22 Sep 2016 12:34:52 +0300 Subject: [PATCH 6/9] MAINT-6694 Gesture floater crash --- indra/llcharacter/llkeyframemotion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index cd201a65b4..e786dfff86 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -2149,7 +2149,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, LLCharacter* character = *char_iter; // look for an existing instance of this motion - LLKeyframeMotion* motionp = (LLKeyframeMotion*) character->findMotion(asset_uuid); + LLKeyframeMotion* motionp = dynamic_cast (character->findMotion(asset_uuid)); if (motionp) { if (0 == status) From 741194085a70c3b6b004ad18b5bf9eb59a81b9c0 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 23 Sep 2016 00:50:16 +0300 Subject: [PATCH 7/9] MAINT-6752 Updated contributions.txt --- doc/contributions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/contributions.txt b/doc/contributions.txt index 05fb19aaf0..9f6b701000 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -201,6 +201,7 @@ Ansariel Hiller MAINT-6612 MAINT-6637 MAINT-6636 + MAINT-6752 Aralara Rajal Arare Chantilly CHUIBUG-191 From 7a7dc795f64c7a8ac6de055db5fcfe83d821810d Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 26 Sep 2016 00:58:25 +0300 Subject: [PATCH 8/9] MAINT-6744 'System UI size factor has changed... ' shouldn't appear after installation --- doc/contributions.txt | 1 + indra/newview/llviewerwindow.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 9f6b701000..772d7fe3b5 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -201,6 +201,7 @@ Ansariel Hiller MAINT-6612 MAINT-6637 MAINT-6636 + MAINT-6744 MAINT-6752 Aralara Rajal Arare Chantilly diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 79ddc43a3e..9679f69e2c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1755,7 +1755,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) F32 system_scale_factor = mWindow->getSystemUISize(); if (p.first_run || gSavedSettings.getF32("LastSystemUIScaleFactor") != system_scale_factor) { - mSystemUIScaleFactorChanged = true; + mSystemUIScaleFactorChanged = !p.first_run; gSavedSettings.setF32("LastSystemUIScaleFactor", system_scale_factor); gSavedSettings.setF32("UIScaleFactor", system_scale_factor); } From 89844b345e8bfc69c5f0bd49bdc402d0b1c24e3b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 30 Sep 2016 17:36:50 +0300 Subject: [PATCH 9/9] MAINT-6786 scale gets out of bonds and causes crash --- indra/newview/llviewerwindow.cpp | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9679f69e2c..4f4b33fa8c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -251,6 +251,11 @@ BOOL gDisplayBadge = FALSE; static const U8 NO_FACE = 255; BOOL gQuietSnapshot = FALSE; +// Minimum value for UIScaleFactor, also defined in preferences, ui_scale_slider +static const F32 MIN_UI_SCALE = 0.75f; +// 2.0 in preferences, but win10 supports larger scaling and value is used more as +// sanity check, so leaving space for larger values from DPI updates. +static const F32 MAX_UI_SCALE = 7.0f; static const F32 MIN_DISPLAY_SCALE = 0.75f; std::string LLViewerWindow::sSnapshotBaseName; @@ -1595,9 +1600,16 @@ BOOL LLViewerWindow::handleDeviceChange(LLWindow *window) void LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height) { - gSavedSettings.setF32("UIScaleFactor", ui_scale_factor); - LLViewerWindow::reshape(window_width, window_height); - mResDirty = true; + if (ui_scale_factor >= MIN_UI_SCALE && ui_scale_factor <= MAX_UI_SCALE) + { + gSavedSettings.setF32("UIScaleFactor", ui_scale_factor); + LLViewerWindow::reshape(window_width, window_height); + mResDirty = true; + } + else + { + LL_WARNS() << "DPI change caused UI scale to go out of bounds: " << ui_scale_factor << LL_ENDL; + } } void LLViewerWindow::handlePingWatchdog(LLWindow *window, const char * msg) @@ -1753,6 +1765,11 @@ LLViewerWindow::LLViewerWindow(const Params& p) F32 system_scale_factor = mWindow->getSystemUISize(); + if (system_scale_factor < MIN_UI_SCALE || system_scale_factor > MAX_UI_SCALE) + { + // reset to default; + system_scale_factor = 1.f; + } if (p.first_run || gSavedSettings.getF32("LastSystemUIScaleFactor") != system_scale_factor) { mSystemUIScaleFactorChanged = !p.first_run; @@ -1763,7 +1780,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) // Get the real window rect the window was created with (since there are various OS-dependent reasons why // the size of a window or fullscreen context may have been adjusted slightly...) - F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor"); + F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor"), MIN_UI_SCALE, MAX_UI_SCALE); mDisplayScale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f)); mDisplayScale *= ui_scale_factor; @@ -5251,7 +5268,7 @@ F32 LLViewerWindow::getWorldViewAspectRatio() const void LLViewerWindow::calcDisplayScale() { - F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor"); + F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor"), MIN_UI_SCALE, MAX_UI_SCALE); LLVector2 display_scale; display_scale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f)); display_scale *= ui_scale_factor; @@ -5264,7 +5281,7 @@ void LLViewerWindow::calcDisplayScale() if (display_scale != mDisplayScale) { - LL_INFOS() << "Setting display scale to " << display_scale << LL_ENDL; + LL_INFOS() << "Setting display scale to " << display_scale << " for ui scale: " << ui_scale_factor << LL_ENDL; mDisplayScale = display_scale; // Init default fonts