Skip to content

Avoid polling every second #2

@vimpostor

Description

@vimpostor

Why use polling when you can use interrupts? There is an idlehint bool in org.freedesktop.login1.session at /org/freedesktop/login1/session/auto and you can get notified when it changes by subscribing to the corresponding PropertiesChanged dbus signal.

It would be much more elegant than the current implementation that polls actively every second.
And it would also get rid of the X11 dependency.

It should be noted though that idlehint is not properly set right now in KDE Plasma: https://bugs.kde.org/show_bug.cgi?id=448942
But that should not be a showstopper, I might fix this bug in KDE over the weekend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions