summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index e694474a41..2a21eeeb53 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1936,6 +1936,11 @@ LLViewerWindow::LLViewerWindow(const Params& p)
}
LLFontManager::initClass();
+
+ // fonts use an GL_UNSIGNED_BYTE image format,
+ // so they need convertion, init buffers if needed
+ LLImageGL::allocateConversionBuffer();
+
// Init font system, load default fonts and generate basic glyphs
// currently it takes aprox. 0.5 sec and we would load these fonts anyway
// before login screen.
@@ -3890,7 +3895,9 @@ void LLViewerWindow::updateKeyboardFocus()
LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
if (cur_focus)
{
- if (!cur_focus->isInVisibleChain() || !cur_focus->isInEnabledChain())
+ bool is_in_visible_chain = cur_focus->isInVisibleChain();
+ bool is_in_enabled_chain = cur_focus->isInEnabledChain();
+ if (!is_in_visible_chain || !is_in_enabled_chain)
{
// don't release focus, just reassign so that if being given
// to a sibling won't call onFocusLost on all the ancestors
@@ -3901,11 +3908,19 @@ void LLViewerWindow::updateKeyboardFocus()
bool new_focus_found = false;
while(parent)
{
+ if (!is_in_visible_chain)
+ {
+ is_in_visible_chain = parent->isInVisibleChain();
+ }
+ if (!is_in_enabled_chain)
+ {
+ is_in_enabled_chain = parent->isInEnabledChain();
+ }
if (parent->isCtrl()
&& (parent->hasTabStop() || parent == focus_root)
&& !parent->getIsChrome()
- && parent->isInVisibleChain()
- && parent->isInEnabledChain())
+ && is_in_visible_chain
+ && is_in_enabled_chain)
{
if (!parent->focusFirstItem())
{
@@ -5360,8 +5375,8 @@ bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
LLViewerCamera* camera = LLViewerCamera::getInstance();
LLViewerCamera saved_camera = LLViewerCamera::instance();
- glh::matrix4f saved_proj = get_current_projection();
- glh::matrix4f saved_mod = get_current_modelview();
+ glm::mat4 saved_proj = get_current_projection();
+ glm::mat4 saved_mod = get_current_modelview();
// camera constants for the square, cube map capture image
camera->setAspect(1.0); // must set aspect ratio first to avoid undesirable clamping of vertical FoV