D5928: Introducing Night Color - KWin's native blue light filter at nighttime

David Edmundson noreply at phabricator.kde.org
Sun May 28 16:58:50 UTC 2017


davidedmundson added inline comments.

INLINE COMMENTS

> subdiff wrote in nightcolor.cpp:111
> Yes: https://www.freedesktop.org/wiki/Software/systemd/logind/
> 
> It's true between signal `PrepareForSleep` is emitted with arg `true` and after sleep again with `false`.

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.

> nightcolor.cpp:81
> +
> +    // monitor for system clock changes - from the time dataengine
> +    auto timeChangedFd = ::timerfd_create(CLOCK_REALTIME, O_CLOEXEC | O_NONBLOCK);

This won't work on BSD, TimeEngine::init()  has a relevant ifdef and a fallback.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170528/10f9be6a/attachment.html>


More information about the Plasma-devel mailing list