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.cpp34
1 files changed, 25 insertions, 9 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 7f7275c8d1..35f33e64cb 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1424,11 +1424,17 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
mWindow->showCursorFromMouseMove();
- if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME
- && !gDisconnected)
+ if (!gDisconnected)
+ {
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
+ }
}
void LLViewerWindow::handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask)
@@ -1547,6 +1553,10 @@ bool LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, bool repeated)
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
// *NOTE: We want to interpret KEY_RETURN later when it arrives as
// a Unicode char, not as a keydown. Otherwise when client frame
@@ -1966,10 +1976,8 @@ LLViewerWindow::LLViewerWindow(const Params& p)
//
LL_DEBUGS("Window") << "Loading feature tables." << LL_ENDL;
-
// Initialize OpenGL Renderer
LLVertexBuffer::initClass(mWindow, gSavedSettings.getU32("MPVertexBufferMode"));
-
LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ;
if (!gGL.init(true))
{
@@ -3019,7 +3027,8 @@ bool LLViewerWindow::handleKey(KEY key, MASK mask)
{
if ((focusedFloaterName == "nearby_chat") || (focusedFloaterName == "im_container") || (focusedFloaterName == "impanel"))
{
- if (gSavedSettings.getBOOL("ArrowKeysAlwaysMove"))
+ LLCachedControl<bool> key_move(gSavedSettings, "ArrowKeysAlwaysMove");
+ if (key_move())
{
// let Control-Up and Control-Down through for chat line history,
if (!(key == KEY_UP && mask == MASK_CONTROL)
@@ -3033,10 +3042,9 @@ bool LLViewerWindow::handleKey(KEY key, MASK mask)
case KEY_RIGHT:
case KEY_UP:
case KEY_DOWN:
- case KEY_PAGE_UP:
- case KEY_PAGE_DOWN:
- case KEY_HOME:
- case KEY_END:
+ case KEY_PAGE_UP: //jump
+ case KEY_PAGE_DOWN: // down
+ case KEY_HOME: // toggle fly
// when chatbar is empty or ArrowKeysAlwaysMove set,
// pass arrow keys on to avatar...
return false;
@@ -4831,13 +4839,21 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
auto err = 0;
auto extension("." + image->getExtension());
auto now = LLDate::now();
+ static LLCachedControl<bool> snapshot_timestamp(gSavedSettings, "SnapshotTimestamp", true);
do
{
filepath = sSnapshotDir;
filepath += gDirUtilp->getDirDelimiter();
filepath += sSnapshotBaseName;
+ if (snapshot_timestamp)
+ {
filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S");
filepath += llformat("%.2d", i);
+ }
+ else if (is_snapshot_name_loc_set)
+ {
+ filepath += llformat("_%.3d", i);
+ }
filepath += extension;
llstat stat_info;