RSIBreak / KIdleTime on Wayland

David Edmundson david at davidedmundson.co.uk
Mon Nov 16 15:26:40 GMT 2020


>If the user was idle for a second (using a KIdleTime timeout), I start my own idle time counter (counter++ every second).
>Then I catch the next resume event (next user input) and reset my counter to 0.

That sounds like what I had in mind.

> 2) It works with XWayland, but only detects user activity if the user makes an input to an XWayland window.

Yeah, that's expected. We only send things to X when an X app has focus.
Changing this behaviour is not an option. I don't think this is a
viable setup option to support.

>RSIBreak is started as an XWayland application by default.
That shouldn't be the case. Are you on OpenSuse by any chance?

>
> 3) It works okay if RSIBreak is started as a native Wayland application (QT_QPA_PLATFORM=wayland).
>    All input is detected, on native and XWayland windows.
>    But: It takes about 5-10 seconds of me not doing any inputs for the idle timeout to be called, instead of the 1 second timeout I requested.
>    (the resume event is emitted immediately though, it is just the idle timout that is slow)

Indeed:

    // less than 5 sec is not idle by definition
    timer->setInterval(qMax(timeout, 5000u));

In kwayland-server/src/server/idle_interface.cpp
I have no objections to changing this.

David

>
> So I wonder if this can be fixed in KIdleTime, or if that's just how Wayland works.
> Thank you,
> Dominik



More information about the kde-devel mailing list