From 2ec7abf56e4febf60b3475592bb5dff5bcf0ae29 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sun, 7 Dec 2014 18:15:14 +0100 Subject: [PATCH] Set the '_notifiedActivity' flag early This way anyone listening to 'activity' signals can safely re-set the flag to 'false' by calling setMonitorActivity(true) again. Right now this is not guaranteed as the signal is handled asynchonously (and indeed in my PyQT-based application the signal would be handled *before* the flag is set to 'true'...) --- lib/Session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Session.cpp b/lib/Session.cpp index e6eca88..420f1a3 100644 --- a/lib/Session.cpp +++ b/lib/Session.cpp @@ -469,8 +469,8 @@ void Session::activityStateSet(int state) if ( _monitorActivity ) { //FIXME: See comments in Session::monitorTimerDone() if (!_notifiedActivity) { - emit activity(); _notifiedActivity=true; + emit activity(); } } }