From 7eea80564f0f0bb00a09b6da3dacbcf83e68812a Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 30 Apr 2010 01:08:09 -0700 Subject: Applied patch for SNOW-384 by Ardy Lay: A tool_tip is obscuring our view when typing into the Chat Bar --- linden/indra/newview/llviewerwindow.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'linden/indra/newview/llviewerwindow.cpp') diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 36f1a70..340d7a3 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -2094,7 +2094,7 @@ void LLViewerWindow::draw() // Draw tooltips // Adjust their rectangle so they don't go off the top or bottom // of the screen. - if( mToolTip && mToolTip->getVisible() ) + if( mToolTip && mToolTip->getVisible() && !mToolTipBlocked ) { glMatrixMode(GL_MODELVIEW); LLUI::pushMatrix(); @@ -2141,6 +2141,16 @@ void LLViewerWindow::draw() // Takes a single keydown event, usually when UI is visible BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { + // Hide tooltips on keypress + mToolTipBlocked = TRUE; // block until next time mouse is moved + + // Also hide hover info on keypress + if (gHoverView) + { + gHoverView->cancelHover(); + gHoverView->setTyping(TRUE); + } + if (gFocusMgr.getKeyboardFocus() && !(mask & (MASK_CONTROL | MASK_ALT)) && !gFocusMgr.getKeystrokesOnly()) @@ -2163,17 +2173,6 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } } - // Hide tooltips on keypress - mToolTipBlocked = TRUE; // block until next time mouse is moved - - // Also hide hover info on keypress - if (gHoverView) - { - gHoverView->cancelHover(); - - gHoverView->setTyping(TRUE); - } - // Explicit hack for debug menu. if ((mask == (MASK_SHIFT | MASK_CONTROL)) && ('G' == key || 'g' == key)) -- cgit v1.1