Merge branch 'DRTVWR-521-maint' of https://bitbucket.org/lindenlab/viewer

master
Ansariel 2021-08-02 09:35:11 +02:00
commit 7ff7317779
27 changed files with 331 additions and 94 deletions

View File

@ -14,7 +14,7 @@ build_docs = true
build_Linux_Doxygen = true
# Need viewer-build-variables as well as other shared repositories
buildscripts_shared_more_NAMEs="build_secrets build_variables"
buildscripts_shared_more_NAMEs="build_secrets build_variables git_hooks"
################################################################
#### Examples of how to set the viewer_channel ####

View File

@ -275,6 +275,22 @@ python_cmd "$helpers/codeticket.py" addinput "Viewer Channel" "${viewer_channel}
initialize_version # provided by buildscripts build.sh; sets version id
begin_section "coding policy check"
# On our TC Windows build hosts, the GitPython library underlying our
# coding_policy_git.py script fails to run git for reasons we have not tried
# to diagnose. Clearly git works fine on those hosts, or we would never get
# this far. Running coding policy checks on one platform *should* suffice...
if [[ "$arch" == "Darwin" ]]
then
# install the git-hooks dependencies
pip install -r "$(native_path "$git_hooks_checkout/requirements.txt")" || \
fatal "pip install git-hooks failed"
# validate the branch we're about to build
python_cmd "$git_hooks_checkout/coding_policy_git.py" --all_files || \
fatal "coding policy check failed"
fi
end_section "coding policy check"
# Now run the build
succeeded=true
last_built_variant=

View File

@ -134,6 +134,13 @@ LLCoros::LLCoros():
LLCoros::~LLCoros()
{
}
void LLCoros::cleanupSingleton()
{
// Some of the coroutines (like voice) will depend onto
// origin singletons, so clean coros before deleting those
printActiveCoroutines("at entry to ~LLCoros()");
// Other LLApp status-change listeners do things like close
// work queues and inject the Stop exception into pending
@ -149,6 +156,8 @@ LLCoros::~LLCoros()
{
// don't use llcoro::suspend() because that module depends
// on this one
// This will yield current(main) thread and will let active
// corutines run once
boost::this_fiber::yield();
}
printActiveCoroutines("after pumping");

View File

@ -89,6 +89,8 @@ class LL_COMMON_API LLCoros: public LLSingleton<LLCoros>
{
LLSINGLETON(LLCoros);
~LLCoros();
void cleanupSingleton();
public:
/// The viewer's use of the term "coroutine" became deeply embedded before
/// the industry term "fiber" emerged to distinguish userland threads from

View File

@ -544,6 +544,8 @@ namespace
protected:
Globals();
public:
std::ostringstream messageStream;
bool messageStreamInUse;
std::string mFatalMessage;
void addCallSite(LLError::CallSite&);
@ -564,6 +566,7 @@ namespace
{
}
Globals* Globals::getInstance()
{
// According to C++11 Function-Local Initialization

View File

@ -1065,6 +1065,43 @@ void LLComboBox::prearrangeList(std::string filter)
}
}
//============================================================================
// ll::ui::SearchableControl functions
//virtual
std::string LLComboBox::_getSearchText() const
{
std::string res;
if (mList)
{
// getAllData returns a full copy of content, might be a
// better option to implement an mList->getSearchText(column)
std::vector<LLScrollListItem*> data = mList->getAllData();
std::vector<LLScrollListItem*>::iterator iter = data.begin();
while (iter != data.end())
{
LLScrollListCell* cell = (*iter)->getColumn(0);
if (cell)
{
std::string whitelist_url = cell->getValue().asString();
res += cell->getValue().asString();
}
iter++;
}
}
return res + getToolTip();
}
//virtual
void LLComboBox::onSetHighlight() const
{
if (mButton)
{
mButton->ll::ui::SearchableControl::setHighlighted(ll::ui::SearchableControl::getHighlighted());
}
}
//============================================================================
// LLCtrlListInterface functions

View File

@ -44,7 +44,9 @@ class LLFontGL;
class LLViewBorder;
class LLComboBox
: public LLUICtrl, public LLCtrlListInterface
: public LLUICtrl
, public LLCtrlListInterface
, public ll::ui::SearchableControl
{
public:
typedef enum e_preferred_position
@ -101,6 +103,9 @@ protected:
void initFromParams(const Params&);
void prearrangeList(std::string filter = "");
virtual std::string _getSearchText() const;
virtual void onSetHighlight() const;
public:
// LLView interface
virtual void onFocusLost();

View File

@ -638,7 +638,7 @@ Vivox SDK License
RSA Data Security, Inc. MD5 Message-Digest Algorithm
Audio coding: Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)
Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C)
Open Source Software Licensing
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.

View File

@ -522,7 +522,7 @@ Vivox SDK License
RSA Data Security, Inc. MD5 Message-Digest Algorithm
Audio coding: Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)
Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C)
Open Source Software Licensing
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.

View File

@ -4,7 +4,7 @@ Logitech License
End-User License Agreement for Logitech LCD SDK
This End-User License Agreement for Logitech LCD SDK ( “Agreement”) is a legal agreement between you, either an individual or legal entity (“You” or “you”) and Logitech Inc. (“Logitech”) for use of the Logitech LCD software development kit, which includes computer software and related media and documentation (hereinafter “LCD SDK”). By using this LCD SDK, you are agreeing to be bound by the terms and conditions of this Agreement. If you do not agree to the terms and conditions of this Agreement, promptly return the LCD SDK and other items that are part of this product in their original package with your sales receipt to your point of purchase for a full refund, or if you have downloaded this software from a Logitech web site, then you must stop using the software and destroy any copies of the software in your possession or control.
This End-User License Agreement for Logitech LCD SDK ( "Agreement") is a legal agreement between you, either an individual or legal entity ("You" or "you") and Logitech Inc. ("Logitech") for use of the Logitech LCD software development kit, which includes computer software and related media and documentation (hereinafter "LCD SDK"). By using this LCD SDK, you are agreeing to be bound by the terms and conditions of this Agreement. If you do not agree to the terms and conditions of this Agreement, promptly return the LCD SDK and other items that are part of this product in their original package with your sales receipt to your point of purchase for a full refund, or if you have downloaded this software from a Logitech web site, then you must stop using the software and destroy any copies of the software in your possession or control.
1 Grant of License and Restrictions.
This Agreement grants You the following rights provided that You comply with all terms and conditions of this Agreement.
@ -14,7 +14,7 @@ This Agreement grants You the following rights provided that You comply with all
(d) In the event Logitech, in its sole discretion, elects to provide copies of the LCD SDK to more than one individual employed by You (if You are not a single individual), each such individual shall be entitled to exercise the rights granted in this Agreement and shall be bound by the terms and conditions herein.
2 Updates.
Logitech is not obligated to provide technical support or updates to You for the LCD SDK provided to You pursuant to this Agreement. However, Logitech may, in its sole discretion, provide further pre-release versions, technical support, updates and/or supplements (“Updates”) to You, in which case such Updates shall be deemed to be included in the “LCD SDK” and shall be governed by this Agreement, unless other terms of use are provided in writing by Logitech with such Updates.
Logitech is not obligated to provide technical support or updates to You for the LCD SDK provided to You pursuant to this Agreement. However, Logitech may, in its sole discretion, provide further pre-release versions, technical support, updates and/or supplements ("Updates") to You, in which case such Updates shall be deemed to be included in the "LCD SDK" and shall be governed by this Agreement, unless other terms of use are provided in writing by Logitech with such Updates.
3 Intellectual Property Rights.
The LCD SDK is licensed, not sold, to You for use only under the terms and conditions of this Agreement. Logitech and its suppliers retain title to the LCD SDK and all intellectual property rights therein. The LCD SDK is protected by intellectual property laws and international treaties, including U.S. copyright law and international copyright treaties. All rights not expressly granted by Logitech are reserved.
@ -23,7 +23,7 @@ The LCD SDK is licensed, not sold, to You for use only under the terms and condi
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, LOGITECH AND ITS SUPPLIERS PROVIDE THE LCD SDK AND OTHER LOGITECH PRODUCTS AND SERVICES (IF ANY) AS IS AND WITHOUT WARRANTY OF ANY KIND. LOGITECH AND ITS SUPPLIERS EXPRESSLY DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD-PARTY RIGHTS WITH RESPECT TO THE LCD SDK AND ANY WARRANTIES OF NON-INTERFERENCE OR ACCURACY OF INFORMATIONAL CONTENT. NO LOGITECH DEALER, AGENT, OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATION, EXTENSION, OR ADDITION TO THIS WARRANTY. Some jurisdictions do not allow limitations on how long an implied warranty lasts, so the above limitation may not apply to you.
5 Limitation of Liability.
IN NO EVENT WILL LOGITECH OR ITS SUPPLIERS BE LIABLE FOR ANY COSTS OF PROCUREMENT OF SUBSTITUTE PRODUCTS OR SERVICES, LOST PROFITS, LOSS OF INFORMATION OR DATA, OR ANY OTHER SPECIAL, INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING IN ANY WAY OUT OF THE SALE OF, USE OF, OR INABILITY TO USE THE LCD SDK OR ANY LOGITECH PRODUCT OR SERVICE, EVEN IF LOGITECH HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE SHALL LOGITECH'S AND ITS SUPPLIERS TOTAL LIABILITY EXCEED THE ACTUAL MONEY PAID FOR THE LOGITECH PRODUCT OR SERVICE GIVING RISE TO THE LIABILITY. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you. The above limitations will not apply in case of personal injury where and to the extent that applicable law requires such liability.
IN NO EVENT WILL LOGITECH OR ITS SUPPLIERS BE LIABLE FOR ANY COSTS OF PROCUREMENT OF SUBSTITUTE PRODUCTS OR SERVICES, LOST PROFITS, LOSS OF INFORMATION OR DATA, OR ANY OTHER SPECIAL, INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING IN ANY WAY OUT OF THE SALE OF, USE OF, OR INABILITY TO USE THE LCD SDK OR ANY LOGITECH PRODUCT OR SERVICE, EVEN IF LOGITECH HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE SHALL LOGITECH'S AND ITS SUPPLIERS' TOTAL LIABILITY EXCEED THE ACTUAL MONEY PAID FOR THE LOGITECH PRODUCT OR SERVICE GIVING RISE TO THE LIABILITY. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you. The above limitations will not apply in case of personal injury where and to the extent that applicable law requires such liability.
6 U.S. Government Rights.
Use, duplication, or disclosure of the software contained in the LCD SDK by the U.S. Government is subject to restrictions set forth in this Agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (OCT 1988) FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable. Logitech Inc. 6505 Kaiser Drive, Fremont, CA 94555.
@ -564,7 +564,7 @@ Vivox SDK License
RSA Data Security, Inc. MD5 Message-Digest Algorithm
Audio coding: Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)
Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C)
Open Source Software Licensing
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.

View File

@ -1457,15 +1457,23 @@ void LLFloaterEditExtDayCycle::reblendSettings()
{
F64 position = mTimeSlider->getCurSliderValue();
if (mSkyBlender)
{
if ((mSkyBlender->getTrack() != mCurrentTrack) && (mCurrentTrack != LLSettingsDay::TRACK_WATER))
{
mSkyBlender->switchTrack(mCurrentTrack, position);
}
else
{
mSkyBlender->setPosition(position);
}
}
if (mWaterBlender)
{
mWaterBlender->setPosition(position);
}
}
void LLFloaterEditExtDayCycle::doApplyCommit(LLSettingsDay::ptr_t day)
{

View File

@ -520,10 +520,13 @@ void LLFloaterIMSessionTab::addConversationViewParticipant(LLConversationItem* p
LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid);
// If not already present, create the participant view and attach it to the root, otherwise, just refresh it
if (widget && update_view)
if (widget)
{
if (update_view)
{
updateConversationViewParticipant(uuid); // overkill?
}
}
else
{
LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model);

View File

@ -4946,7 +4946,12 @@ void LLPanelPreferenceControls::setKeyBind(const std::string &control, EMouseCli
break;
}
}
mConflictHandler[mode].registerControl(control, index, click, key, mask, true);
// At the moment 'ignore_mask' mask is mostly ignored, a placeholder
// Todo: implement it since it's preferable for things like teleport to match
// mask exactly but for things like running to ignore additional masks
// Ideally this needs representation in keybindings UI
bool ignore_mask = true;
mConflictHandler[mode].registerControl(control, index, click, key, mask, ignore_mask);
}
else if (!set)
{

View File

@ -35,8 +35,8 @@ bool llHashedUniqueID(unsigned char id[MD5HEX_STR_SIZE])
bool idIsUnique = true;
LLMD5 hashed_unique_id;
unsigned char unique_id[MAC_ADDRESS_BYTES];
if ( LLUUID::getNodeID(unique_id)
|| LLMachineID::getUniqueID(unique_id, sizeof(unique_id))
if ( LLMachineID::getUniqueID(unique_id, sizeof(unique_id))
|| LLUUID::getNodeID(unique_id)
)
{
hashed_unique_id.update(unique_id, MAC_ADDRESS_BYTES);

View File

@ -6093,7 +6093,7 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action)
LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
if (preview_texture)
{
preview_texture->saveMultipleToFile();
preview_texture->saveMultipleToFile(mFileName);
}
}
else

View File

@ -430,6 +430,9 @@ public:
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual void performAction(LLInventoryModel* model, std::string action);
bool canSaveTexture(void);
void setFileName(const std::string& file_name) { mFileName = file_name; }
protected:
std::string mFileName;
};
class LLSoundBridge : public LLItemBridge

View File

@ -2801,13 +2801,22 @@ void LLInventoryAction::saveMultipleTextures(const std::vector<std::string>& fil
LLFloater::setFloaterHost(multi_previewp);
std::map<std::string, S32> tex_names_map;
std::set<LLFolderViewItem*>::iterator set_iter;
for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
{
LLFolderViewItem* folder_item = *set_iter;
if(!folder_item) continue;
LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem();
LLTextureBridge* bridge = (LLTextureBridge*)folder_item->getViewModelItem();
if(!bridge) continue;
std::string tex_name = bridge->getName();
if(!tex_names_map.insert(std::pair<std::string, S32>(tex_name, 0)).second)
{
tex_names_map[tex_name]++;
bridge->setFileName(tex_name + llformat("_%.3d", tex_names_map[tex_name]));
}
bridge->performAction(model, "save_selected_as");
}

View File

@ -470,10 +470,10 @@ void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenam
}
void LLPreviewTexture::saveMultipleToFile()
void LLPreviewTexture::saveMultipleToFile(const std::string& file_name)
{
std::string texture_location(gSavedSettings.getString("TextureSaveLocation"));
std::string texture_name = getItem()->getName();
std::string texture_name = file_name.empty() ? getItem()->getName() : file_name;
std::string filepath;
S32 i = 0;

View File

@ -89,7 +89,7 @@ public:
//void saveTextureToFile(const std::vector<std::string>& filenames);
void saveTextureToFile(const std::vector<std::string>& filenames, EFileformatType format, loaded_callback_func callback, uuid_vec_t remaining_ids = uuid_vec_t());
// </FS:Ansariel>
void saveMultipleToFile();
void saveMultipleToFile(const std::string& file_name = "");
static void onSaveAsBtn(LLUICtrl* ctrl, void* data);

View File

@ -67,8 +67,21 @@ const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed
const LLKeyData agent_control_lbutton(CLICK_LEFT, KEY_NONE, MASK_NONE, true);
struct LLKeybindFunctionData
{
LLKeybindFunctionData(boost::function<bool(EKeystate keystate)> function, bool global)
:
mFunction(function),
mIsGlobal(global)
{
}
boost::function<bool(EKeystate keystate)> mFunction;
// todo: might be good idea to make this into enum, like: global/inworld/menu
bool mIsGlobal;
};
struct LLKeyboardActionRegistry
: public LLRegistrySingleton<std::string, boost::function<bool (EKeystate keystate)>, LLKeyboardActionRegistry>
: public LLRegistrySingleton<const std::string, LLKeybindFunctionData, LLKeyboardActionRegistry>
{
LLSINGLETON_EMPTY_CTOR(LLKeyboardActionRegistry);
};
@ -942,7 +955,10 @@ bool agen_control_lbutton_handle(EKeystate s)
return true;
}
#define REGISTER_KEYBOARD_ACTION(KEY, ACTION) LLREGISTER_STATIC(LLKeyboardActionRegistry, KEY, ACTION);
// In-world keybindings, like walking or camera
#define REGISTER_KEYBOARD_ACTION(KEY, ACTION) LLREGISTER_STATIC(LLKeyboardActionRegistry, KEY, LLKeybindFunctionData(ACTION, false));
// Global keybindings that should work even with floaters focused, like voice
#define REGISTER_KEYBOARD_GLOBAL_ACTION(KEY, ACTION) LLREGISTER_STATIC(LLKeyboardActionRegistry, KEY, LLKeybindFunctionData(ACTION, true));
REGISTER_KEYBOARD_ACTION("jump", agent_jump);
REGISTER_KEYBOARD_ACTION("push_down", agent_push_down);
REGISTER_KEYBOARD_ACTION("push_forward", agent_push_forward);
@ -993,8 +1009,8 @@ REGISTER_KEYBOARD_ACTION("toggle_pause_media", toggle_pause_media);
REGISTER_KEYBOARD_ACTION("toggle_enable_media", toggle_enable_media);
REGISTER_KEYBOARD_ACTION("teleport_to", teleport_to);
REGISTER_KEYBOARD_ACTION("walk_to", walk_to);
REGISTER_KEYBOARD_ACTION("toggle_voice", toggle_voice);
REGISTER_KEYBOARD_ACTION("voice_follow_key", voice_follow_key);
REGISTER_KEYBOARD_GLOBAL_ACTION("toggle_voice", toggle_voice);
REGISTER_KEYBOARD_GLOBAL_ACTION("voice_follow_key", voice_follow_key);
#undef REGISTER_KEYBOARD_ACTION
LLViewerInput::LLViewerInput()
@ -1125,6 +1141,33 @@ BOOL LLViewerInput::handleKeyUp(KEY translated_key, MASK translated_mask)
return gViewerWindow->handleKeyUp(translated_key, translated_mask);
}
bool LLViewerInput::handleGlobalBindsKeyDown(KEY key, MASK mask)
{
S32 mode = getMode();
return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, TRUE, FALSE, FALSE, FALSE);
}
bool LLViewerInput::handleGlobalBindsKeyUp(KEY key, MASK mask)
{
S32 mode = getMode();
return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, FALSE, TRUE, FALSE, FALSE);
}
bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down)
{
bool res = false;
S32 mode = getMode();
if (down)
{
res = scanMouse(mGlobalMouseBindings[mode], mGlobalMouseBindings[mode].size(), clicktype, mask, MOUSE_STATE_DOWN, true);
}
else
{
res = scanMouse(mGlobalMouseBindings[mode], mGlobalMouseBindings[mode].size(), clicktype, mask, MOUSE_STATE_UP, true);
}
return res;
}
BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name)
{
S32 index;
@ -1153,38 +1196,63 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
// Not remapped, look for a function
function_t* result = LLKeyboardActionRegistry::getValue(function_name);
LLKeybindFunctionData* result = LLKeyboardActionRegistry::getValue(function_name);
if (result)
{
function = *result;
function = result->mFunction;
}
if (!function)
{
LL_ERRS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
LL_WARNS_ONCE() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
return FALSE;
}
// check for duplicate first and overwrite
S32 size = mKeyBindings[mode].size();
for (index = 0; index < size; index++)
{
if (key == mKeyBindings[mode][index].mKey && mask == mKeyBindings[mode][index].mMask)
break;
}
if (mode >= MODE_COUNT)
{
LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL;
return FALSE;
}
// check for duplicate first and overwrite
if (result->mIsGlobal)
{
S32 size = mGlobalKeyBindings[mode].size();
for (index = 0; index < size; index++)
{
if (key == mGlobalKeyBindings[mode][index].mKey && mask == mGlobalKeyBindings[mode][index].mMask)
{
mGlobalKeyBindings[mode][index].mFunction = function;
return TRUE;
}
}
}
else
{
S32 size = mKeyBindings[mode].size();
for (index = 0; index < size; index++)
{
if (key == mKeyBindings[mode][index].mKey && mask == mKeyBindings[mode][index].mMask)
{
mKeyBindings[mode][index].mFunction = function;
return TRUE;
}
}
}
LLKeyboardBinding bind;
bind.mKey = key;
bind.mMask = mask;
bind.mFunction = function;
if (result->mIsGlobal)
{
mGlobalKeyBindings[mode].push_back(bind);
}
else
{
mKeyBindings[mode].push_back(bind);
}
return TRUE;
}
@ -1195,38 +1263,63 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const
typedef boost::function<bool(EKeystate)> function_t;
function_t function = NULL;
function_t* result = LLKeyboardActionRegistry::getValue(function_name);
LLKeybindFunctionData* result = LLKeyboardActionRegistry::getValue(function_name);
if (result)
{
function = *result;
function = result->mFunction;
}
if (!function)
{
LL_ERRS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
LL_WARNS_ONCE() << "Can't bind mouse key to function " << function_name << ", no function with this name found" << LL_ENDL;
return FALSE;
}
// check for duplicate first and overwrite
S32 size = mMouseBindings[mode].size();
for (index = 0; index < size; index++)
{
if (mouse == mMouseBindings[mode][index].mMouse && mask == mMouseBindings[mode][index].mMask)
break;
}
if (mode >= MODE_COUNT)
{
LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL;
return FALSE;
}
// check for duplicate first and overwrite
if (result->mIsGlobal)
{
S32 size = mGlobalMouseBindings[mode].size();
for (index = 0; index < size; index++)
{
if (mouse == mGlobalMouseBindings[mode][index].mMouse && mask == mGlobalMouseBindings[mode][index].mMask)
{
mGlobalMouseBindings[mode][index].mFunction = function;
return true;
}
}
}
else
{
S32 size = mMouseBindings[mode].size();
for (index = 0; index < size; index++)
{
if (mouse == mMouseBindings[mode][index].mMouse && mask == mMouseBindings[mode][index].mMask)
{
mMouseBindings[mode][index].mFunction = function;
return true;
}
}
}
LLMouseBinding bind;
bind.mMouse = mouse;
bind.mMask = mask;
bind.mFunction = function;
if (result->mIsGlobal)
{
mGlobalMouseBindings[mode].push_back(bind);
}
else
{
mMouseBindings[mode].push_back(bind);
}
return TRUE;
}
@ -1253,6 +1346,8 @@ void LLViewerInput::resetBindings()
{
for (S32 i = 0; i < MODE_COUNT; i++)
{
mGlobalKeyBindings[i].clear();
mGlobalMouseBindings[i].clear();
mKeyBindings[i].clear();
mMouseBindings[i].clear();
}
@ -1530,11 +1625,18 @@ BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask,
return handled;
}
bool LLViewerInput::scanMouse(const std::vector<LLMouseBinding> &binding, S32 binding_count, EMouseClickType mouse, MASK mask, EMouseState state) const
bool LLViewerInput::scanMouse(
const std::vector<LLMouseBinding> &binding,
S32 binding_count,
EMouseClickType mouse,
MASK mask,
EMouseState state,
bool ignore_additional_masks
) const
{
for (S32 i = 0; i < binding_count; i++)
{
if (binding[i].mMouse == mouse && (binding[i].mMask & mask) == binding[i].mMask)
if (binding[i].mMouse == mouse && (ignore_additional_masks ? (binding[i].mMask & mask) == binding[i].mMask : binding[i].mMask == mask))
{
bool res = false;
switch (state)
@ -1571,7 +1673,11 @@ bool LLViewerInput::scanMouse(EMouseClickType click, EMouseState state) const
bool res = false;
S32 mode = getMode();
MASK mask = gKeyboard->currentMask(TRUE);
res = scanMouse(mMouseBindings[mode], mMouseBindings[mode].size(), click, mask, state);
// By default mouse clicks require exact mask
// Todo: support for mIgnoreMasks because some functions like teleports
// expect to be canceled, but for voice it's prefered to ignore mask.
res = scanMouse(mMouseBindings[mode], mMouseBindings[mode].size(), click, mask, state, false);
// no user defined actions found or those actions can't handle the key/button, handle control if nessesary
if (!res && agent_control_lbutton.canHandle(click, KEY_NONE, mask))
{
@ -1627,5 +1733,11 @@ bool LLViewerInput::isMouseBindUsed(const EMouseClickType mouse, const MASK mask
if (mouse == mMouseBindings[mode][index].mMouse && mask == mMouseBindings[mode][index].mMask)
return true;
}
size = mGlobalMouseBindings[mode].size();
for (S32 index = 0; index < size; index++)
{
if (mouse == mGlobalMouseBindings[mode][index].mMouse && mask == mGlobalMouseBindings[mode][index].mMask)
return true;
}
return false;
}

View File

@ -109,6 +109,13 @@ public:
BOOL handleKey(KEY key, MASK mask, BOOL repeated);
BOOL handleKeyUp(KEY key, MASK mask);
// Handle 'global' keybindings that do not consume event,
// yet need to be processed early
// Example: we want voice to toggle even if some floater is focused
bool handleGlobalBindsKeyDown(KEY key, MASK mask);
bool handleGlobalBindsKeyUp(KEY key, MASK mask);
bool handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down);
S32 loadBindingsXML(const std::string& filename); // returns number bound, 0 on error
EKeyboardMode getMode() const;
@ -149,7 +156,8 @@ private:
S32 binding_count,
EMouseClickType mouse,
MASK mask,
EMouseState state) const;
EMouseState state,
bool ignore_additional_masks) const;
S32 loadBindingMode(const LLViewerInput::KeyMode& keymode, S32 mode);
BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name);
@ -164,6 +172,10 @@ private:
std::vector<LLKeyboardBinding> mKeyBindings[MODE_COUNT];
std::vector<LLMouseBinding> mMouseBindings[MODE_COUNT];
// keybindings that do not consume event and are handled earlier, before floaters
std::vector<LLKeyboardBinding> mGlobalKeyBindings[MODE_COUNT];
std::vector<LLMouseBinding> mGlobalMouseBindings[MODE_COUNT];
typedef std::map<U32, U32> key_remap_t;
key_remap_t mRemapKeys[MODE_COUNT];
std::set<KEY> mKeysSkippedByUI;

View File

@ -423,6 +423,8 @@ LLMenuParcelObserver::~LLMenuParcelObserver()
void LLMenuParcelObserver::changed()
{
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
if (gMenuHolder && parcel)
{
// <FS:Ansariel> FIRE-4454: Cache controls because of performance reasons
//gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID()== gAgent.getID()));
//
@ -444,6 +446,7 @@ void LLMenuParcelObserver::changed()
land_buy_pie->setEnabled(buyable);
// </FS:Ansariel> FIRE-4454: Cache controls because of performance reasons
}
}
void initialize_menus();

View File

@ -59,7 +59,6 @@
#include "llslurl.h"
#include "llrender.h"
#include "llvoiceclient.h" // for push-to-talk button handling
#include "stringize.h"
//
@ -1157,6 +1156,9 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
x = ll_round((F32)x / mDisplayScale.mV[VX]);
y = ll_round((F32)y / mDisplayScale.mV[VY]);
// Handle non-consuming global keybindings, like voice
gViewerInput.handleGlobalBindsMouse(clicktype, mask, down);
// only send mouse clicks to UI if UI is visible
if(gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
@ -1677,6 +1679,10 @@ void LLViewerWindow::handleFocusLost(LLWindow *window)
BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
{
// Handle non-consuming global keybindings, like voice
// Never affects event processing.
gViewerInput.handleGlobalBindsKeyDown(key, mask);
if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
{
gAgent.clearAFK();
@ -1701,6 +1707,10 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask)
{
// Handle non-consuming global keybindings, like voice
// Never affects event processing.
gViewerInput.handleGlobalBindsKeyUp(key, mask);
// Let the inspect tool code check for ALT key to set LLToolSelectRect active instead LLToolCamera
LLToolCompInspect * tool_inspectp = LLToolCompInspect::getInstance();
if (LLToolMgr::getInstance()->getCurrentTool() == tool_inspectp)

View File

@ -1487,8 +1487,8 @@ Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Desktop
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Desktop x86/MMX/SSE2 unsupported 1 1 3 Mesa
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile unsupported 1 1 3 Mesa
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2 unsupported 1 1 3 Mesa
Intel Open Source Technology Center Mesa DRI Mobile Intelå¨ GM45 Express Chipset unsupported 1 1 3 Mesa
Intel Open Source Technology Center Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2 unsupported 1 1 3 Mesa
Intel Open Source Technology Center Mesa DRI Mobile Intel(R) GM45 Express Chipset unsupported 1 1 3 Mesa
Intel Open Source Technology Center Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2 unsupported 1 1 3 Mesa
Intel Pineview supported 0 1 1.4 Intel Pineview
Intel Q45/Q43 supported 1 1 2.1 Intel Q45/Q43
Intel Royal BNA Driver unsupported 0 0 0 Intel Royal BNA
@ -3012,11 +3012,11 @@ Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile GEM 20100330 DEVELOPMENT x86/MMX/SSE2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Server unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4 supported 1 1 2.1 Intel Q45/Q43
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2 supported 1 1 2.1 Intel Q45/Q43
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20091221 2009Q4 supported 1 1 2.1 Intel Q45/Q43
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2 supported 1 1 2.1 Intel Q45/Q43
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc. Mesa DRI R100 (RS200 4437) x86/MMX/SSE2 NO-TCL DRI2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc. Mesa DRI R100 (RV200 4C57) TCL DRI2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc. Mesa DRI R100 (RV200 4C57) x86/MMX/SSE2 TCL DRI2 unsupported 1 1 3 Mesa

View File

@ -1954,8 +1954,8 @@ Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Desktop x86/MM
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
Intel Open Source Technology Center Mesa DRI Mobile Intelå¨ GM45 Express Chipset
Intel Open Source Technology Center Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2
Intel Open Source Technology Center Mesa DRI Mobile Intel(R) GM45 Express Chipset
Intel Open Source Technology Center Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2
Intel Pineview
Intel Q45/Q43
Intel Royal BNA Driver
@ -4079,12 +4079,12 @@ Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile GEM 20100330 DEVELOP
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Server
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20091221 2009Q4
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2
Tungsten Graphics, Inc. Mesa DRI R100 (RS200 4437) x86/MMX/SSE2 NO-TCL DRI2
Tungsten Graphics, Inc. Mesa DRI R100 (RV200 4C57) TCL DRI2
Tungsten Graphics, Inc. Mesa DRI R100 (RV200 4C57) x86/MMX/SSE2 TCL DRI2