subdiff added inline comments. INLINE COMMENTS
> davidedmundson wrote in nightcolor.cpp:111 > How confusing. In any case we have a race condition. > > We're triggering this on timeChangedFd so we have behaviour that basically > changes depending on whether logind has processed resuming and sent a signal > before or after kwin processes this. > > Why do we have this check anyway? We need to resetAllTimers if the system > time changes due to a timezone change too. Well, in my tests logind always changed the value of this property way later then the notifier was triggered (like 1 second), so I assumed that this is always the case. But you're right, that I don't know for sure. > Why do we have this check anyway? It's only a small difference in look and it's working anyway, that's why I probably found the possible race condition not that important. Take a look at line 117. If it's true, we change the color temperature value without fade, otherwise we do. The else case is for example triggered on timezone change while running, so it fades nicely in. But this is a corner case, and we might just ignore it. REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D5928 To: subdiff, #kwin Cc: cfeck, graesslin, davidedmundson, plasma-devel, kwin, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein, lukas