triage#162 "Away" status is removed even by a random hover
instead of having a 10 second delay to 'confirm' activitymaster
parent
9567393f80
commit
7947ce3559
|
|
@ -91,7 +91,7 @@
|
|||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<real>300.0</real>
|
||||
<real>300</real>
|
||||
</map>
|
||||
<key>AckCollectTime</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -454,11 +454,20 @@ void idle_afk_check()
|
|||
{
|
||||
// check idle timers
|
||||
F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32();
|
||||
F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
|
||||
if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK())
|
||||
LLCachedControl<S32> afk_timeout(gSavedSettings, "AFKTimeout", 300);
|
||||
if (afk_timeout() && (current_idle > afk_timeout()))
|
||||
{
|
||||
LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
|
||||
gAgent.setAFK();
|
||||
if (!gAgent.getAFK())
|
||||
{
|
||||
LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
|
||||
gAgent.setAFK();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Refresh timer so that random one click or hover won't clear the status.
|
||||
// But expanding the window still should lift afk status
|
||||
gAwayTimer.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -806,6 +806,10 @@ void LLViewerJoystick::moveObjects(bool reset)
|
|||
{
|
||||
gAgent.clearAFK();
|
||||
}
|
||||
else
|
||||
{
|
||||
gAwayTriggerTimer.reset();
|
||||
}
|
||||
|
||||
if (sDelta[0] || sDelta[1] || sDelta[2])
|
||||
{
|
||||
|
|
@ -980,6 +984,10 @@ void LLViewerJoystick::moveAvatar(bool reset)
|
|||
{
|
||||
gAgent.clearAFK();
|
||||
}
|
||||
else
|
||||
{
|
||||
gAwayTriggerTimer.reset();
|
||||
}
|
||||
|
||||
setCameraNeedsUpdate(true);
|
||||
}
|
||||
|
|
@ -1192,10 +1200,17 @@ void LLViewerJoystick::moveFlycam(bool reset)
|
|||
}
|
||||
|
||||
// Clear AFK state if moved beyond the deadzone
|
||||
if (!is_zero && gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
|
||||
{
|
||||
gAgent.clearAFK();
|
||||
}
|
||||
if (!is_zero)
|
||||
{
|
||||
if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
|
||||
{
|
||||
gAgent.clearAFK();
|
||||
}
|
||||
else
|
||||
{
|
||||
gAwayTriggerTimer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
sFlycamPosition += LLVector3(sDelta) * sFlycamRotation;
|
||||
|
||||
|
|
@ -1256,6 +1271,10 @@ bool LLViewerJoystick::toggleFlycam()
|
|||
{
|
||||
gAgent.clearAFK();
|
||||
}
|
||||
else
|
||||
{
|
||||
gAwayTriggerTimer.reset();
|
||||
}
|
||||
|
||||
mOverrideCamera = !mOverrideCamera;
|
||||
if (mOverrideCamera)
|
||||
|
|
|
|||
|
|
@ -1425,11 +1425,17 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
|
|||
|
||||
mWindow->showCursorFromMouseMove();
|
||||
|
||||
if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME
|
||||
&& !gDisconnected)
|
||||
{
|
||||
gAgent.clearAFK();
|
||||
}
|
||||
if (!gDisconnected)
|
||||
{
|
||||
if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
|
||||
{
|
||||
gAgent.clearAFK();
|
||||
}
|
||||
else
|
||||
{
|
||||
gAwayTriggerTimer.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerWindow::handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask)
|
||||
|
|
@ -1545,6 +1551,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
|
||||
|
|
|
|||
Loading…
Reference in New Issue