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.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 61505b7c07..2d3b48bab3 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2724,8 +2724,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
return TRUE;
}
- if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask))
- ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)))
+ if (gAgent.isInitialized()
+ && (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE || gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL)
+ && gMenuBarView
+ && gMenuBarView->handleAcceleratorKey(key, mask))
+ {
+ LLViewerEventRecorder::instance().logKeyEvent(key, mask);
+ return TRUE;
+ }
+
+ if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
return TRUE;
@@ -2855,8 +2863,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
// give menus a chance to handle unmodified accelerator keys
- if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask))
- ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)))
+ if (gAgent.isInitialized()
+ && (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE || gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL)
+ && gMenuBarView
+ && gMenuBarView->handleAcceleratorKey(key, mask))
+ {
+ LLViewerEventRecorder::instance().logKeyEvent(key, mask);
+ return TRUE;
+ }
+
+ if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
return TRUE;
}